📄 simuresultmulti.m
字号:
% str2double(get(hObject,'String')) returns contents of editMinAct as a double
% --- Executes during object creation, after setting all properties.
function editMinAct_CreateFcn(hObject, eventdata, handles)
% hObject handle to editMinAct (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: editN controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function editMaxAct_Callback(hObject, eventdata, handles)
% hObject handle to editMaxAct (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 editMaxAct as text
% str2double(get(hObject,'String')) returns contents of editMaxAct as a double
% --- Executes during object creation, after setting all properties.
function editMaxAct_CreateFcn(hObject, eventdata, handles)
% hObject handle to editMaxAct (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: editN controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function editMeanAct_Callback(hObject, eventdata, handles)
% hObject handle to editMeanAct (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 editMeanAct as text
% str2double(get(hObject,'String')) returns contents of editMeanAct as a double
% --- Executes during object creation, after setting all properties.
function editMeanAct_CreateFcn(hObject, eventdata, handles)
% hObject handle to editMeanAct (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: editN controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function editStdAct_Callback(hObject, eventdata, handles)
% hObject handle to editStdAct (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 editStdAct as text
% str2double(get(hObject,'String')) returns contents of editStdAct as a double
% --- Executes during object creation, after setting all properties.
function editStdAct_CreateFcn(hObject, eventdata, handles)
% hObject handle to editStdAct (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: editN controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in btnCancel.
function btnStat_Callback(hObject, eventdata, handles)
% hObject handle to btnCancel (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% set(handles.figure1,'Toolbar','none');
set(handles.uipanel1,'visible','on')
cla(handles.axes1)
cla(handles.axes2)
set([handles.axes1 handles.axes2],'visible','off')
set(handles.UIMenuHist,'Checked','off')
set(handles.UIMenuStat,'Checked','on')
set(handles.uipanelSimuPre,'visible','on');
set(handles.UIMenuView,'visible','off');
set(handles.uipanelRange,'visible','off');
function editMaxError_Callback(hObject, eventdata, handles)
% hObject handle to editMaxError (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 editMaxError as text
% str2double(get(hObject,'String')) returns contents of editMaxError as a double
% --- Executes during object creation, after setting all properties.
function editMaxError_CreateFcn(hObject, eventdata, handles)
% hObject handle to editMaxError (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function editMAE_Callback(hObject, eventdata, handles)
% hObject handle to editMAE (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 editMAE as text
% str2double(get(hObject,'String')) returns contents of editMAE as a double
% --- Executes during object creation, after setting all properties.
function editMAE_CreateFcn(hObject, eventdata, handles)
% hObject handle to editMAE (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function editMSE_Callback(hObject, eventdata, handles)
% hObject handle to editMSE (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 editMSE as text
% str2double(get(hObject,'String')) returns contents of editMSE as a double
% --- Executes during object creation, after setting all properties.
function editMSE_CreateFcn(hObject, eventdata, handles)
% hObject handle to editMSE (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in btnCancel.
function btnCancel_Callback(hObject, eventdata, handles)
% hObject handle to btnCancel (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close
% h=findobj('tag','btnResultOutput');
% get(h,'string')
% --- 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)
function edit14_Callback(hObject, eventdata, handles)
% hObject handle to edit14 (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 edit14 as text
% str2double(get(hObject,'String')) returns contents of edit14 as a double
% --- Executes during object creation, after setting all properties.
function edit14_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit14 (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function editMaxAbsError_Callback(hObject, eventdata, handles)
% hObject handle to editMaxAbsError (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 editMaxAbsError as text
% str2double(get(hObject,'String')) returns contents of editMaxAbsError as a double
% --- Executes during object creation, after setting all properties.
function editMaxAbsError_CreateFcn(hObject, eventdata, handles)
% hObject handle to editMaxAbsError (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
function editMaxRelError_Callback(hObject, eventdata, handles)
% hObject handle to editMaxRelError (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 editMaxRelError as text
% str2double(get(hObject,'String')) returns contents of editMaxRelError as a double
% --- Executes during object creation, after setting all properties.
function editMaxRelError_CreateFcn(hObject, eventdata, handles)
% hObject handle to editMaxRelError (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on button press in btnHist.
function btnHist_Callback(hObject, eventdata, handles)
% hObject handle to btnHist (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
Sresult=evalin('base','Sresult');
Temp_simu=Sresult.Temp_simu;
Temp_act=Sresult.Temp_act;
Temp_pre=Sresult.Temp_pre;
str = {'柱状图','散点图'};
[s_Temp,v_Temp] = listdlg('ListString',str);
if v_Temp==1
switch s_Temp
case 1
% 柱状图
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if max(abs(Temp_pre(:,1)-Temp_act))<=20
t=[-20:2:20]';
elseif max(abs(Temp_pre(:,1)-Temp_act))<=30
t=[-30:3:30]';
elseif max(abs(Temp_pre(:,1)-Temp_act))<=40
t=[-40:4:40]';
elseif max(abs(Temp_pre(:,1)-Temp_act))<=50
t=[-50:5:50]';
elseif max(abs(Temp_pre(:,1)-Temp_act))<=60
t=[-60:6:60]';
axis([-60,60,0,inf])
elseif max(abs(Temp_pre(:,1)-Temp_act))<=70
t=[-70:7:70]';
else
t=[-100:10:100]';
end
% 仿真值
axes(handles.axes1)
hist(Temp_simu(:,1)-Temp_act,t);
h1 = findobj(gca,'Type','patch');
set(h1,'FaceColor','b','EdgeColor','w');
xlabel('温度(`C)','fontsize',9);
ylabel('带钢数','fontsize',9);
title('仿真值柱状图','fontsize',10,'fontweight','bold');
grid on
% 预计算
axes(handles.axes2)
hist(Temp_pre(:,1)-Temp_act,t);
h2 = findobj(gca,'Type','patch');
set(h2,'FaceColor','r','EdgeColor','w');
xlabel('温度(`C)','fontsize',9);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -