📄 temp_conversion.m
字号:
function fig = temp_conversion()
% This is the machine-generated representation of a Handle Graphics object
% and its children. Note that handle values may change when these objects
% are re-created. This may cause problems with any callbacks written to
% depend on the value of the handle at the time the object was saved.
% This problem is solved by saving the output as a FIG-file.
%
% To reopen this object, just type the name of the M-file at the MATLAB
% prompt. The M-file and its associated MAT-file must be on your path.
%
% NOTE: certain newer features in MATLAB may not have been saved in this
% M-file due to limitations of this format, which has been superseded by
% FIG-files. Figures which have been annotated using the plot editor tools
% are incompatible with the M-file/MAT-file format, and should be saved as
% FIG-files.
load temp_conversion
h0 = figure('Units','points', ...
'Color',[0.8 0.8 0.8], ...
'Colormap',mat0, ...
'FileName','D:\book\Matlab\rev2\chap10\temp_conversion.m', ...
'Name','Temperature Conversion', ...
'NumberTitle','off', ...
'PaperPosition',[18 180 576 432], ...
'PaperType','A4', ...
'PaperUnits','points', ...
'Position',mat1, ...
'Tag','Fig1', ...
'ToolBar','none');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'ListboxTop',0, ...
'Position',[26 71 59 14], ...
'String','Degrees F', ...
'Style','text', ...
'Tag','Label1');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','temp_conversion_callback Edit1', ...
'ListboxTop',0, ...
'Position',[105 71 59 14], ...
'String','32.0', ...
'Style','edit', ...
'Tag','Edit1');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[0.8 0.8 0.8], ...
'ListboxTop',0, ...
'Position',[26 50 59 14], ...
'String','Degrees C', ...
'Style','text', ...
'Tag','Label2');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'BackgroundColor',[1 1 1], ...
'Callback','temp_conversion_callback Edit2', ...
'ListboxTop',0, ...
'Position',[105 50 59 14], ...
'String','0.0', ...
'Style','edit', ...
'Tag','Edit2');
h1 = uicontrol('Parent',h0, ...
'Units','points', ...
'Callback','temp_conversion_callback Slider1', ...
'ListboxTop',0, ...
'Max',100, ...
'Position',[46 22 99 13], ...
'Style','slider', ...
'Tag','Slider1');
h1 = axes('Parent',h0, ...
'Units','pixels', ...
'CameraUpVector',[0 1 0], ...
'Color',[1 1 1], ...
'ColorOrder',mat2, ...
'Position',[318 27 34 125], ...
'Tag','Axes1', ...
'XColor',[0 0 0], ...
'YColor',[0 0 0], ...
'ZColor',[0 0 0]);
h2 = text('Parent',h1, ...
'Color',[0 0 0], ...
'HandleVisibility','off', ...
'HorizontalAlignment','center', ...
'Position',mat3, ...
'Tag','Axes1Text4', ...
'VerticalAlignment','cap');
set(get(h2,'Parent'),'XLabel',h2);
h2 = text('Parent',h1, ...
'Color',[0 0 0], ...
'HandleVisibility','off', ...
'HorizontalAlignment','center', ...
'Position',mat4, ...
'Rotation',90, ...
'Tag','Axes1Text3', ...
'VerticalAlignment','baseline');
set(get(h2,'Parent'),'YLabel',h2);
h2 = text('Parent',h1, ...
'Color',[0 0 0], ...
'HandleVisibility','off', ...
'HorizontalAlignment','right', ...
'Position',[-9.636363636363637 1.161290322580645 9.160254037844386], ...
'Tag','Axes1Text2', ...
'Visible','off');
set(get(h2,'Parent'),'ZLabel',h2);
h2 = text('Parent',h1, ...
'Color',[0 0 0], ...
'HandleVisibility','off', ...
'HorizontalAlignment','center', ...
'Position',[0.4848484848484844 1.064516129032258 9.160254037844386], ...
'Tag','Axes1Text1', ...
'VerticalAlignment','bottom');
set(get(h2,'Parent'),'Title',h2);
if nargout > 0, fig = h0; end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -