⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shili78.m

📁 matlab实例编程一百个源程序,包含了各个方面的实例编程
💻 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 + -