正在加载图片...
MATLAB Lecture 8 School of Mathematical Sciences Xiamen Univer tp: /gdjpkc. xmu. edu.cn t=0:pi/30:9*pi;a=20;c=3 >x=at *sin(t); y=a*t *cos(t):z=c*t; > plot(x,y, z, 'mo) magenta, line type circle View Insert Icols Qeakte? Lindow ulp 的回日m曰 Compare ezplot3(20t. sin(t), 20*t *cos(t), 3 t, [0 9*pi],'mo) y2=coS(x); > plot(x, yl, b-'): %blue color solid(-) line style hold on: %after this command, all additional plots will be laid on top of the previously existing plot le > hold off, %switches plotting behavior back to the default situation, in which A new plot replaces the previous one >>x=-pi: pi/20: pi; >yl=sin(x);MATLAB Lecture 8  School of Mathematical Sciences Xiamen University  http://gdjpkc.xmu.edu.cn  Lec8­7  >> t = 0:pi/30:9*pi; a = 20; c = 3;  >> x = a*t.*sin(t); y = a*t.*cos(t); z = c*t; >> plot3(x,y,z,’mo’) %color magenta, line type circle Compare >> ezplot3('20*t.*sin(t)','20*t.*cos(t)','3*t',[0 9*pi],’mo’) ² Plotting Multiple Plots on the Same Axes  >> x = ­pi:pi/20:pi; >> y1 = sin(x);  >> y2 = cos(x);  >> plot (x, y1, ‘b­’ );  %blue color solid(­) line style >> hold on; %after this command, all additional plots will be laid on top of the ..  previously existing plots.  >> plot (x, y2, ‘k­­’);  %black color dashed(­­) line style  >> hold off;  %switches plotting behavior back to the default situation, in which …  A new plot replaces the previous one >> legend (‘sin x’, ‘cosx’); Or >> x = ­pi:pi/20:pi; >> y1 = sin(x);
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有