正在加载图片...
MATLAB Lecture 8 School of Mathematical Sciences Xiamen Univer http://gdjpkc.xmu.edu.cn lot(x, y) tle(窗口1标题”) >> subplot(2, 1, 2) %create 2 X lsubplots in current figure, arranged in 2 rows and I column, and selects subplot 2 to receive all current plotting command >>y=cos(-X) > plot(x, y); te(窗口2标题) D回俄回长日阻■口 窗口2标题 Some examples clear; x0: pi/20: 2. " pi, y= sin(x) y1=cos(2*x): plot(x, y, --rs', linewidth, 2, markeredgecolor', k, ' markerfacecolor, 'g, 'markersize, 10) hold > plot(x,yl, -ko, markeredgecolor','k, markerfacecolor,'T, markersize, 10) >legend(sinx,"cos2x') Bile Edit View Insert Fools Desktop lindow Help Lec8-9MATLAB Lecture 8  School of Mathematical Sciences Xiamen University  http://gdjpkc.xmu.edu.cn  Lec8­9  >> y = sin(x);  >> plot (x, y);  >> title (‘窗口 1  标题’); >> subplot(2,1,2) %create 2×1subplots in current figure, arranged in 2 rows …  and 1 column, and selects subplot 2 to receive all current …  plotting commands  >> x = ­pi:pi/20:pi; >> y = cos(­x);  >> plot (x, y);  >> title (‘窗口 2  标题’);  ² Some examples >> clear; x=0:pi/20:2.*pi; y= sin(x);  >> y1=cos(2.*x);  >> plot(x,y,'­­rs','linewidth',2,'markeredgecolor','k','markerfacecolor','g','markersize',10) >> hold on  >> plot(x,y1,'­ko','markeredgecolor','k','markerfacecolor','r','markersize',10) >> legend (‘sinx’, ‘cos2x’)
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有