?? shili78.m
字號:
h0=figure('toolbar','none',...
'position',[198 56 350 468],...
'name','實例78');
h1=axes('parent',h0,...
'position',[0.25 0.45 0.5 0.5],...
'visible','off');
load imdemos flower
imshow(flower)
colormap(copper)
n=size(X,1);
b1=uicontrol('parent',h0,...
'units','points',...
'tag','b1',...
'style','pushbutton',...
'string','輪廓圖',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[30 100 50 20],...
'callback',[...
'cla,',...
'[X,map]=imread(''flowers.tif'');,',...
'X=double(flower);,',...
'X=(0.25/256)*X;,',...
'C=copper(35);,',...
'set(gca,''colororder'',C(21:35,:),''box'',''on'');,',...
'imcontour(X,3);,',...
'axis([1 n 1 n]),',...
'axis(''ij''),',...
'axis(''square'')']);
b2=uicontrol('parent',h0,...
'units','points',...
'tag','b2',...
'style','pushbutton',...
'string','偽彩圖',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[100 100 50 20],...
'callback',[...
'cla,',...
'D=-del2(X);,',...
'pcolor(D),',...
'axis([1 n 1 n]),',...
'axis(''ij''),',...
'shading(''flat'')']);
b3=uicontrol('parent',h0,...
'units','points',...
'tag','b3',...
'style','pushbutton',...
'string','3D表面圖',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[170 100 50 20],...
'callback',[...
'cla,',...
'D=-del2(X);,',...
'surf(X,D),',...
'colormap(copper),',...
'axis([1 n 1 n 0 1]),',...
'axis(''ij''),',...
'shading(''flat''),',...
'view(-20,75);']);
b4=uicontrol('parent',h0,...
'units','points',...
'tag','b4',...
'style','pushbutton',...
'string','關閉',...
'backgroundcolor',[0.75 0.75 0.75],...
'position',[80 50 80 30],...
'callback','close');
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -