📄 tempsimumain.m
字号:
function btnRadiate_Callback(hObject, eventdata, handles)
% hObject handle to btnRadiate (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%计算辐射温降 开始
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 读入已计算的结果
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FM=get(handles.btnFMTempSimu,'userdata');
Temp_radiat=FM{1}.Temp_radiat;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 单条或多条带钢仿真
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 判断是否新图显示
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if get(handles.checkboxFigure,'value')
hNewR=figure;
axes('parent',hNewR);
set(gcf,'color','w');
else
axes(handles.axes1);
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if get(handles.btnMultiSimu,'value')==0
% 单条带钢仿真 开始
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% sign=handles.stripListVal;
%
% if isequal(get(handles.UIMenuModel1,'checked'),'on')
% % 进行非差分模型仿真
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% [Temp_simu,Temp_act,Temp_pre,Temp_deform_inc,Temp_heat_trans,Temp_radiat,...
% Temp_cooling]=TempSimuCalc(sign,Mparam,Eparam,data);
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% elseif isequal(get(handles.UIMenuModel2,'checked'),'on')
% path_pwd=handles.PathDefault;
% path=strcat(handles.PathDefault,'\DiffModel');
% cd(path);
% % 进行差分模型仿真
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% [Temp_simu,Temp_act,Temp_pre,Temp_deform_inc,Temp_heat_trans,Temp_radiat,Temp_cooling]=TempDiffSimul(sign,data);
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% cd(path_pwd);
% end
bar(Temp_radiat(1,:));
ylabel('温度(`C)','FontSize',9);
if get(handles.checkboxGrid,'value')
grid on;
else
grid off;
end
set(gca,'XTick',[1:1:8]);
set(gca,'XTickLabel','RDT~F1|F1~F2|F2~F3|F3~F4|F4~F5|F5~F6|F6~F7|F7~FDT')
title('辐射温降','fontweight','bold','fontsize',10);
% 单条带钢仿真 结束
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
elseif get(handles.btnMultiSimu,'value')==1
% 多条带钢仿真 开始
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% h = waitbar(0,'请稍等...');
% for i=1:100, % computation here %
% waitbar(i/100)
% end
% close(h)
% sign=handles.stripListVal1:handles.stripListVal2;
% [Temp_simu,Temp_act,Temp_pre,Temp_deform_inc,Temp_heat_trans,Temp_radiat,Temp_cooling]=TempSimuCalc(sign,Mparam,Eparam,data);
str = {'RDT~FDT全部','精轧前辊道辐射温降','机架F1~F2间辐射','机架F2~F3间辐射','机架F3~F4间辐射','机架F4~F5间辐射',...
'机架F5~F6间辐射','机架F6~F7间辐射','机架F7~FDT间辐射'};
[s_radiat,v_radiat] = listdlg('name','辐射温降','PromptString','选择:',...
'SelectionMode','single',...
'ListString',str);
if v_radiat
switch s_radiat
case 1
plot(Temp_radiat);
legend('RDT~F1','F1~F2','F2~F3','F3~F4','F4~F5','F5~F6','F6~F7','F7~FDT');
title('辐射温降','fontweight','bold','fontsize',10);
case 2
plot(Temp_radiat(:,1));
title('RDT~F1辐射温降','fontweight','bold','fontsize',10);
case 3
plot(Temp_radiat(:,2));
title('F1~F2辐射温降','fontweight','bold','fontsize',10);
case 4
plot(Temp_radiat(:,3));
title('F2~F3辐射温降','fontweight','bold','fontsize',10);
case 5
plot(Temp_radiat(:,4));
title('F3~F4辐射温降','fontweight','bold','fontsize',10);
case 6
plot(Temp_radiat(:,5));
title('F4~F5辐射温降','fontweight','bold','fontsize',10);
case 7
plot(Temp_radiat(:,6));
title('F5~F6辐射温降','fontweight','bold','fontsize',10);
case 8
plot(Temp_radiat(:,7));
title('F5~F6辐射温降','fontweight','bold','fontsize',10);
case 9
plot(Temp_radiat(:,8));
title('F7~FDT辐射温降','fontweight','bold','fontsize',10);
end
xlabel('带钢数','FontSize',9);
ylabel('温度(`C)','FontSize',9);
if get(handles.checkboxGrid,'value')
grid on;
else
grid off;
end
if get(handles.checkboxHold,'value')
hold on;
else
hold off;
end
end
% 多条带钢仿真 开始
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
end
%计算辐射温降 结束
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% --- Executes on button press in radiobutton5.
function radiobutton5_Callback(hObject, eventdata, handles)
% hObject handle to radiobutton5 (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 radiobutton5
% --- Executes on selection change in popupmenu1.
function popupmenu1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu1 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu1
% --- Executes during object creation, after setting all properties.
function popupmenu1_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu 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 Untitled_1_Callback(hObject, eventdata, handles)
% hObject handle to Untitled_1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in checkboxHold.
function checkboxHold_Callback(hObject, eventdata, handles)
% hObject handle to checkboxHold (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 checkboxHold
% ‘保持旧图’按钮的设置
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if get(hObject,'value')==1
set(gca,'NextPlot','Add');
set(handles.UIMenuGrid,'Checked','On');
elseif get(hObject,'value')==0
set(gca,'NextPlot','Replace');
set(handles.UIMenuGrid,'Checked','Off');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% --- Executes on button press in checkboxGrid.
function checkboxGrid_Callback(hObject, eventdata, handles)
% hObject handle to checkboxGrid (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 checkboxGrid
% ‘关栅开关’按钮的设置
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
if get(hObject,'value')==1
set(gca,'XGrid','on','YGrid','on');
set(handles.UIMenuGrid,'Checked','On');
else
set(gca,'XGrid','off','YGrid','off');
set(handles.UIMenuGrid,'Checked','Off');
end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% --- Executes on button press in pushbutton13.
function pushbutton13_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton13 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in UIMenuResult.
function UIMenuResult_Callback(hObject, eventdata, handles)
% hObject handle to UIMenuResult (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
if ~isstruct(evalin('base','Sresult')) %如果还未进行温度计算仿真
errordlg('请先进行温度计算!','出错信息');
elseif isstruct(evalin('base','Sresult'))
if get(handles.btnMultiSimu,'Value')==0
SimuResultSingle
elseif get(handles.btnMultiSimu,'Value')==1
SimuResultMulti
end
end
% --- Executes on button press in btnSavePara.
function pushbutton16_Callback(hObject, eventdata, handles)
% hObject handle to btnSavePara (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
function edit3_Callback(hObject, eventdata, handles)
% hObject handle to edit3 (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 edit3 as textCurrentSet
% str2double(get(hObject,'String')) returns contents of edit3 as a double
% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (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 edit4_Callback(hObject, eventdata, handles)
% hObject handle to edit4 (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 edit4 as textCurrentSet
% str2double(get(hObject,'String')) returns contents of edit4 as a double
% --- Executes during object creation, after setting all properties.
function edit4_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit4 (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 checkbox6.
function checkbox6_Callback(hObject, eventdata, handles)
% hObject handle to checkbox6 (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 checkbox6
function edit5_Callback(hObject, eventdata, handles)
% hObject handle to edit5 (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 edit5 as textCurrentSet
% str2double(get(hObject,'String')) returns contents of edit5 as a double
% --- Executes during object creation, after setting all properties.
function edit5_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit5 (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 pushbutton17.
function pushbutton17_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton17 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on selection change in listbox3.
function listbox3_Callback(hObject, e
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -