function varargout = konghuaqi(varargin)
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @konghuaqi_OpeningFcn, ...
'gui_OutputFcn', @konghuaqi_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin & isstr(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before konghuaqi is made visible.
function konghuaqi_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to konghuaqi (see VARARGIN)
% Choose default command line output for konghuaqi
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes konghuaqi wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = konghuaqi_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on button press in Plot_push.
function Plot_push_Callback(hObject, eventdata, handles)
%global DeltaCav DeltaFinE Theta
DeltaCav=str2num(get(handles.Cav_edit,'String'))*pi/180;
DeltaFinE=str2num(get(handles.FinE_edit,'String'))*pi/180;
Theta=str2num(get(handles.Fashe_edit,'String'));
y0=[60 0 0 Theta*pi/180 0 0];%给函数赋初值
tspan=[0 10];
[t,y]=ode45('projectiledes',tspan,y0,[],DeltaCav,DeltaFinE,Theta);
plot(y(:,5),y(:,6),'r'),grid on
xlabel('\fontsize{14} \bfU\rightarrow')
ylabel('\fontsize{14} \bfW\rightarrow')
legend(['弹道曲线'])
% hold on
% hObject handle to Plot_push (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes during object creation, after setting all properties.
function Cav_edit_CreateFcn(hObject, eventdata, handles)
% hObject handle to Cav_edit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function Cav_edit_Callback(hObject, eventdata, handles)
% hObject handle to Cav_edit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of Cav_edit as text
% str2double(get(hObject,'String')) returns contents of Cav_edit as a double
% --- Executes during object creation, after setting all properties.
function FinE_edit_CreateFcn(hObject, eventdata, handles)
% hObject handle to FinE_edit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function FinE_edit_Callback(hObject, eventdata, handles)
% hObject handle to FinE_edit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of FinE_edit as text
% str2double(get(hObject,'String')) returns contents of FinE_edit as a double
% --- Executes during object creation, after setting all properties.
function Fashe_edit_CreateFcn(hObject, eventdata, handles)
% hObject handle to Fashe_edit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
function Fashe_edit_Callback(hObject, eventdata, handles)
% hObject handle to Fashe_edit (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of Fashe_edit as text
% str2double(get(hObject,'String')) returns contents of Fashe_edit as a double
% --- Executes on button press in WT_push.
function WT_push_Callback(hObject, eventdata, handles)
% hObject handle to WT_push (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%global DeltaCav DeltaFinE Theta
DeltaCav=str2num(get(handles.Cav_edit,'String'))*pi/180;
DeltaFinE=str2num(get(handles.FinE_edit,'String'))*pi/180;
Theta=str2num(get(handles.Fashe_edit,'String'));
y0=[60 0 0 Theta*pi/180 0 0];%给函数赋初值
tspan=[0 10];
[t,y]=ode45('projectiledes',tspan,y0,[],DeltaCav,DeltaFinE,Theta);
%subplot(2,3,1),plot(Edit_text2,y(:,1))
%subplot(2,3,2),plot(Edit_text2,y(:,2))
%subplot(2,3,3),plot(Edit_text2,y(:,3))
%subplot(2,3,4),plot(Edit_text2,y(:,4))
%subplot(2,3,5),
plot(t,y(:,2),'r'),grid on
xlabel('\fontsize{14} \bft\rightarrow')
ylabel('\fontsize{14} \bfW\rightarrow')
% hold on
% --- Executes on button press in qT_push.
function qT_push_Callback(hObject, eventdata, handles)
% hObject handle to qT_push (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%global DeltaCav DeltaFinE Theta //18号去掉
DeltaCav=str2num(get(handles.Cav_edit,'String'))*pi/180;
DeltaFinE=str2num(get(handles.FinE_edit,'String'))*pi/180;
Theta=str2num(get(handles.Fashe_edit,'String'));
y0=[60 0 0 Theta*pi/180 0 0];%给函数赋初值
tspan=[0 10];
[t,y]=ode45('projectiledes',tspan,y0,[],DeltaCav,DeltaFinE,Theta);
%subplot(2,3,1),plot(Edit_text2,y(:,1))
%subplot(2,3,2),plot(Edit_text2,y(:,2))
%subplot(2,3,3),plot(Edit_text2,y(:,3))
%subplot(2,3,4),plot(Edit_text2,y(:,4))
%subplot(2,3,5),
plot(t,y(:,3),'r'),grid on
xlabel('\fontsize{14} \bft\rightarrow')
ylabel('\fontsize{14} \bfq\rightarrow')
% hold on
% --- Executes on button press in UT_push.
function UT_push_Callback(hObject, eventdata, handles)
% hObject handle to UT_push (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%global DeltaCav DeltaFinE Theta
DeltaCav=str2num(get(handles.Cav_edit,'String'))*pi/180;
DeltaFinE=str2num(get(handles.FinE_edit,'String'))*pi/180;
Theta=str2num(get(handles.Fashe_edit,'String'));
y0=[60 0 0 Theta*pi/180 0 0];%给函数赋初值
tspan=[0 10];
[t,y]=o
20.LQR源程序.zip
版权申诉
133 浏览量
2022-07-06
11:22:48
上传
评论
收藏 54KB ZIP 举报
![avatar](https://profile-avatar.csdnimg.cn/default.jpg!1)
stbomei
- 粉丝: 41
- 资源: 1234
最新资源
- Scratch 物理经典游戏:喷气背包冲刺.sb3
- StepMotor-Matlab-master-matlab画图zip
- ROS 中地图相关的示例,简单的地图发布,障碍物地图发布以及膨胀地图的发布
- 索尼IMX250MZR的去马赛克算法
- python实现基于深度学习高性能中文车牌识别(源码+数据)
- 用于MATLAB的bossdevice API
- docker配置使用,很值得学习的笔记
- Python实现基于 opencv 和 tensorflow 的车牌识别项目(源码+数据).zip
- TM1629B SOP-32封装 LED驱动控制专用电路 深圳市可芯电子有限公司.pdf
- qt-everywhere-src-5.15.0
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)