正在加载图片...
if lx==2, X=[l 1 X(l; end [width height] input format Is); set U s=get(Hf, sz) =(X-1)/([S(3:4)]-1) set(Hf, Units, u); reset Units if any(Y>1) f lx==2, Y=Y(3: 4); end width height]output format 精通 MATLAB工具箱中的两个函数 mmcont2和 emcon3都用用户指定的颜色映象画等 值线图。每一个函数分析输入参量并建立一个字符串,它包含了颜色的说明。一旦设置了字符 串,就设置了当前坐标轴的 ColorOrder’属性;最后,它们分别调用具有合适的参量的函数 contour和 contour3来画出图形。函数 mmcont2的M文件描述如下 function( cs, h=mmcont2(argl, arg2, arg3, arg 4, arg5) %MMCONT2 2-D contour plot using a colormap %o MMCONT2(X,Y, Z, N, C)plots N contours of Z in 2-D using the color %o specified in CC can be a linestyle and color as used in plot, % e.g., T-, orC can be the string Name of a colormap. X and Y define the axis limits If not given default argument values are: N=10, C=hot X and Y =row and column indices of Z. Examples MMCONT2(Z 10 lines with hot colormap MMCONT2(Z, 20) 20 lines with hot colormap MMCONT2(Z, copper') 0 lines with copper colormap MMCONT2(Z, 20, 'gray) 20 lines with MMCONT2(X,Y, Z, jet) 10 lines with jet colormap %o MMCONT2(Z,c-) 10 dashed lines in cyan MMCONT2(X,Y, Z, 25, pink) 25 lines in pink colormap CSMMCONT2(-)returns the contour matrix CS as described CONTOURO [CS, H=MMCONT2(.)returns a column vector H of handles to Copyright(c)1996 by Prentice-Hall, Inc n=10: c="hot. default valuesend if lx==2,X=[1 1 X(:)’ ];end % [width height] input format u=get(Hf, ‘Units’ ); % get Units set (Hf, ‘Units’ , ‘pixels’ ); % set Units to pixels s=get(Hf,sz); Y=(X-1)./([s(3:4)]-1); % convert set(Hf, ‘Units’ ,u); % reset Units if any(Y>1) error(msg) end if lx==2,Y=Y(3:4);end % [width height] output format 精通 MATLAB 工具箱中的两个函数 mmcont2 和 mmcont3 都用用户指定的颜色映象画等 值线图。每一个函数分析输入参量并建立一个字符串,它包含了颜色的说明。一旦设置了字符 串,就设置了当前坐标轴的 ‘ColorOrder’ 属性;最后,它们分别调用具有合适的参量的函数 contour 和 contour3 来画出图形。函数 mmcont2 的 M 文件描述如下: function[cs,h]=mmcont2(arg1,arg2,arg3,arg4,arg5) %MMCONT2 2-D contour plot using a colormap. % MMCONT2(X,Y,Z,N,C) plots N contours of Z in 2-D using the color % specified in C.C can be a linestyle and color as used in plot, % e.g., ‘r-’ ,orC can be the string Name of a colormap. X and Y % define the axis limits. % If not given default argument values are: N=10,C= ‘hot’ , % X and Y =row and column indices of Z. Examples: % MMCONT2(Z) 10 lines with hot colormap % MMCONT2(Z,20) 20 lines with hot colormap % MMCONT2(Z, ‘copper’ ) 10 lines with copper colormap % MMCONT2(Z,20, ‘gray’ ) 20 lines with gray colormap % MMCONT2(X,Y,Z, ‘jet’ ) 10 lines with jet colormap % MMCONT2(Z, ‘c-’ ) 10 dashed lines in cyan % MMCONT2(X,Y,Z,25, ‘pink’ ) 25 lines in pink colormap % % CS=MMCONT2(…) returns the contour matrix CS as described in % CONTOURC. % [CS,H]=MMCONT2(…) returns a column vector H of handles to % line objects. % Copyright (c) 1996 by Prentice-Hall,Inc. n=10;c= ‘hot’ ; % default values nargs=nargin;cflag=1;
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有