📄 transfer_alignment_modify_simulation_systme.m
字号:
% handles structure with handles and user data (see GUIDATA)% --- Executes on button press in pushbutton4.function pushbutton4_Callback(hObject, eventdata, handles)%绘制准速度误差均方根曲线% hObject handle to pushbutton4 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)load trans_data.txt
t=trans_data(:,1);
q=trans_data(:,14);
w=trans_data(:,15);
e=trans_data(:,16);
plot(t,q,'parent',handles.x1)
set(handles.x1,'XGrid','on','YGrid','on')
set(get(handles.x1,'XLabel'),'String','时间T(秒)')
set(get(handles.x1,'YLabel'),'String','X轴(米/秒)')
%xlabel('T(单位:秒)') 用此法只能标注最后一个
%ylabel('X(单位:米/秒)')grid on
plot(t,w,'parent',handles.y1)
set(handles.y1,'XGrid','on','YGrid','on')
set(get(handles.y1,'XLabel'),'String','时间T(秒)')
set(get(handles.y1,'YLabel'),'String','Y轴(米/秒)')
plot(t,-e,'parent',handles.z1)
set(handles.z1,'XGrid','on','YGrid','on')
set(get(handles.z1,'XLabel'),'String','时间T(秒)')
set(get(handles.z1,'YLabel'),'String','Z轴(米/秒)')
% --- Executes on button press in pushbutton5.function pushbutton5_Callback(hObject, eventdata, handles)%绘制平台误差角均方根曲线% hObject handle to pushbutton5 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)load trans_data.txt
t=trans_data(:,1);
q=trans_data(:,17);
w=trans_data(:,18);
e=trans_data(:,19);
plot(t,q,'parent',handles.x1)
set(handles.x1,'XGrid','on','YGrid','on')
set(get(handles.x1,'XLabel'),'String','时间T(秒)')
set(get(handles.x1,'YLabel'),'String','X轴(角分)')
plot(t,w,'parent',handles.y1)
set(handles.y1,'XGrid','on','YGrid','on')
set(get(handles.y1,'XLabel'),'String','时间T(秒)')
set(get(handles.y1,'YLabel'),'String','Y轴(角分)')
plot(t,e,'parent',handles.z1)
set(handles.z1,'XGrid','on','YGrid','on')
set(get(handles.z1,'XLabel'),'String','时间T(秒)')
set(get(handles.z1,'YLabel'),'String','Z轴(角分)')% --- Executes on button press in pushbutton6.function pushbutton6_Callback(hObject, eventdata, handles) %绘制挠曲变形均方根曲线% hObject handle to pushbutton6 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)load trans_data.txt
t=trans_data(:,1);
q=trans_data(:,20);
w=trans_data(:,21);
e=trans_data(:,22);
plot(t,q,'parent',handles.x1)
set(handles.x1,'XGrid','on','YGrid','on')
set(get(handles.x1,'XLabel'),'String','时间T(秒)')
set(get(handles.x1,'YLabel'),'String','X轴(角分)')
plot(t,w,'parent',handles.y1)
set(handles.y1,'XGrid','on','YGrid','on')
set(get(handles.y1,'XLabel'),'String','时间T(秒)')
set(get(handles.y1,'YLabel'),'String','Y轴(角分)')
plot(t,e,'parent',handles.z1)
set(handles.z1,'XGrid','on','YGrid','on')
set(get(handles.z1,'XLabel'),'String','时间T(秒)')
set(get(handles.z1,'YLabel'),'String','Z轴(角分)')
% --- Executes on button press in pushbutton7.function pushbutton7_Callback(hObject, eventdata, handles)%绘制陀螺漂移均方根曲线% hObject handle to pushbutton7 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)load trans_data.txt
t=trans_data(:,1);
q=trans_data(:,23);
w=trans_data(:,24);
e=trans_data(:,25);
plot(t,q,'parent',handles.x1)
set(handles.x1,'XGrid','on','YGrid','on')
set(get(handles.x1,'XLabel'),'String','时间T(秒)')
set(get(handles.x1,'YLabel'),'String','X轴(度)')
plot(t,w,'parent',handles.y1)
set(handles.y1,'XGrid','on','YGrid','on')
set(get(handles.y1,'XLabel'),'String','时间T(秒)')
set(get(handles.y1,'YLabel'),'String','Y轴(度)')
plot(t,-e,'parent',handles.z1)
set(handles.z1,'XGrid','on','YGrid','on')
set(get(handles.z1,'XLabel'),'String','时间T(秒)')
set(get(handles.z1,'YLabel'),'String','Z轴(度)')% --- Executes on button press in pushbutton8.function pushbutton8_Callback(hObject, eventdata, handles) %绘制加速度计零均方根曲线% hObject handle to pushbutton8 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)load trans_data.txt
t=trans_data(:,1);
q=trans_data(:,26);
w=trans_data(:,27);
e=trans_data(:,28);
plot(t,q,'parent',handles.x1)
set(handles.x1,'XGrid','on','YGrid','on')
set(get(handles.x1,'XLabel'),'String','时间T(秒)')
set(get(handles.x1,'YLabel'),'String','X轴(G/1000)')
plot(t,w,'parent',handles.y1)
set(handles.y1,'XGrid','on','YGrid','on')
set(get(handles.y1,'XLabel'),'String','时间T(秒)')
set(get(handles.y1,'YLabel'),'String','Y轴(G/1000)')
plot(t,-e,'parent',handles.z1)
set(handles.z1,'XGrid','on','YGrid','on')
set(get(handles.z1,'XLabel'),'String','时间T(秒)')
set(get(handles.z1,'YLabel'),'String','Z轴(G/1000)')% --- Executes on button press in pushbutton9.function pushbutton9_Callback(hObject, eventdata, handles) %绘制准速度状态误差曲线% hObject handle to pushbutton9 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)load trans_data.txt
t=trans_data(:,1);
q=trans_data(:,29);
w=trans_data(:,30);
e=trans_data(:,31);
plot(t,q,'parent',handles.x2)
set(handles.x2,'XGrid','on','YGrid','on')
set(get(handles.x2,'XLabel'),'String','时间T(秒)')
set(get(handles.x2,'YLabel'),'String','X轴(米/秒)')
plot(t,w,'parent',handles.y2)
set(handles.y2,'XGrid','on','YGrid','on')
set(get(handles.y2,'XLabel'),'String','时间T(秒)')
set(get(handles.y2,'YLabel'),'String','Y轴(米/秒)')
plot(t,-e,'parent',handles.z2)
set(handles.z2,'XGrid','on','YGrid','on')
set(get(handles.z2,'XLabel'),'String','时间T(秒)')
set(get(handles.z2,'YLabel'),'String','Z轴(米/秒)')% --- Executes on button press in pushbutton10function pushbutton10_Callback(hObject, eventdata, handles)%绘制平台误差角状态误差曲线 % hObject handle to pushbutton10 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)load trans_data.txt
t=trans_data(:,1);
q=trans_data(:,31);
w=trans_data(:,32);
e=trans_data(:,33);
plot(t,q,'parent',handles.x2)
set(handles.x2,'XGrid','on','YGrid','on')
set(get(handles.x2,'XLabel'),'String','时间T(秒)')
set(get(handles.x2,'YLabel'),'String','X轴(角分)')
plot(t,w,'parent',handles.y2)
set(handles.y2,'XGrid','on','YGrid','on')
set(get(handles.y2,'XLabel'),'String','时间T(秒)')
set(get(handles.y2,'YLabel'),'String','Y轴(角分)')
plot(t,e,'parent',handles.z2)
set(handles.z2,'XGrid','on','YGrid','on')
set(get(handles.z2,'XLabel'),'String','时间T(秒)')
set(get(handles.z2,'YLabel'),'String','Z轴(角分)')% --- Executes on button press in pushbutton11.function pushbutton11_Callback(hObject, eventdata, handles)%绘制挠曲变形状态误差曲线% hObject handle to pushbutton11 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)load trans_data.txt
t=trans_data(:,1);
q=trans_data(:,34);
w=trans_data(:,35);
e=trans_data(:,36);
plot(t,q,'parent',handles.x2)
set(handles.x2,'XGrid','on','YGrid','on')
set(get(handles.x2,'XLabel'),'String','时间T(秒)')
set(get(handles.x2,'YLabel'),'String','X轴(角分)')
plot(t,w,'parent',handles.y2)
set(handles.y2,'XGrid','on','YGrid','on')
set(get(handles.y2,'XLabel'),'String','时间T(秒)')
set(get(handles.y2,'YLabel'),'String','Y轴(角分)')
plot(t,e,'parent',handles.z2)
set(handles.z2,'XGrid','on','YGrid','on')
set(get(handles.z2,'XLabel'),'String','时间T(秒)')
set(get(handles.z2,'YLabel'),'String','Z轴(角分)')
% --- Executes on button press in pushbutton12.function pushbutton12_Callback(hObject, eventdata, handles) %绘制陀螺漂移状态误差曲线% hObject handle to pushbutton12 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)load trans_data.txt
t=trans_data(:,1);
q=trans_data(:,37);
w=trans_data(:,38);
e=trans_data(:,39);
plot(t,q,'parent',handles.x2)
set(handles.x2,'XGrid','on','YGrid','on')
set(get(handles.x2,'XLabel'),'String','时间T(秒)')
set(get(handles.x2,'YLabel'),'String','X轴(度)')
plot(t,w,'parent',handles.y2)
set(handles.y2,'XGrid','on','YGrid','on')
set(get(handles.y2,'XLabel'),'String','时间T(秒)')
set(get(handles.y2,'YLabel'),'String','Y轴(度)')
plot(t,e,'parent',handles.z2)
set(handles.z2,'XGrid','on','YGrid','on')
set(get(handles.z2,'XLabel'),'String','时间T(秒)')
set(get(handles.z2,'YLabel'),'String','Z轴(度)')% --- Executes on button press in togglebutton1.
function pushbutton13_Callback(hObject, eventdata, handles)%绘制加速度计零状态误差曲线
load trans_data.txt
t=trans_data(:,1);
q=trans_data(:,40);
w=trans_data(:,41);
e=trans_data(:,42);
plot(t,q,'parent',handles.x2)
set(handles.x2,'XGrid','on','YGrid','on')
set(get(handles.x2,'XLabel'),'String','时间T(秒)')
set(get(handles.x2,'YLabel'),'String','X轴(G/1000)')
plot(t,w,'parent',handles.y2)
set(handles.y2,'XGrid','on','YGrid','on')
set(get(handles.y2,'XLabel'),'String','时间T(秒)')
set(get(handles.y2,'YLabel'),'String','Y轴(G/1000)')
plot(t,e,'parent',handles.z2)
set(handles.z2,'XGrid','on','YGrid','on')
set(get(handles.z2,'XLabel'),'String','时间T(秒)')
set(get(handles.z2,'YLabel'),'String','Z轴(G/1000)')function togglebutton1_Callback(hObject, eventdata, handles)% hObject handle to togglebutton1 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hint: get(hObject,'Value') returns toggle state of togglebutton1function mutual_exclude(off) %单选按钮置零函数
set(off,'Value',0)%% --- Executes on button press in sy.%function sy_Callback(hObject, eventdata, handles) % 设置单选按钮值,并将其它值设零% hObject handle to sy (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)% Hint: get(hObject,'Value') returns toggle state of sy
off = [handles.sj,handles.sx,handles.pg,handles.scsj];
mutual_exclude(off);xz=1;set(handles.text33,'string',' ');% --- Executes on button press in sj.function sj_Callback(hObject, eventdata, handles) % 设置单选按钮值,并将其它值设零% hObject handle to sj (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)xz=2;% Hint: get(hObject,'Value') returns toggle state of sjoff = [handles.sy,handles.sx,handles.pg,handles.scsj];
mutual_exclude(off);set(handles.text33,'string',' ');% --- Executes on button press in sx.function sx_Callback(hObject, eventdata, handles) % 设置单选按钮值,并将其它值设零% hObject handle to sx (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hint: get(hObject,'Value') returns toggle state of sxoff = [handles.sj,handles.sy,handles.pg,handles.scsj];
mutual_exclude(off);xz=3;
set(handles.text33,'string',' ');% --- Executes on button press in pg.function pg_Callback(hObject, eventdata, handles) % 设置单选按钮值,并将其它值设零% hObject handle to pg (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)% Hint: get(hObject,'Value') returns toggle state of pgoff = [handles.sj,handles.sx,handles.sy,handles.scsj];
mutual_exclude(off);xz=4;set(handles.text33,'string',' ');% --- Executes on button press in togglebutton3.function togglebutton3_Callback(hObject, eventdata, handles)%复制小坐标的图形到详细图上% hObject handle to togglebutton3 (see GCBO)% eventdata reserved - to be defined in a future version of MATLAB% handles structure with handles and user data (see GUIDATA)h4=findobj(handles.x1,'type','line');%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%important
fHandle2 = figure('HandleVisibility','on','IntegerHandle','on','Visible','on');
aHandle2 = axes('Parent',fHandle2);
set(aHandle2,'XGrid','on','YGrid','on');
copyobj(h4,gca)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -