欢迎来到天天文库
浏览记录
ID:1695273
大小:57.50 KB
页数:6页
时间:2017-11-13
《matlab图形保存及图例的设置和函数》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、图形的保存的步骤:figure——edit——copyfigure例1:x=[0,0.48,0.84,1,0.91,0.6,0.14];subplot(2,2,1)>>plot(x)>>holdon>>subplot(2,2,2)>>plot(x,'*')>>subplot(2,2,3)>>plot(x,'-b*')>>subplot(2,2,4)>>plot(x,'-k*')x=0:0.01:2*pi;>>y1=sin(x);>>y2=cos(x);>>plot(x,y1,'b',x,y2,'r')>>legend('正弦曲线','余弦曲线')>>title('正弦与余弦曲线')
2、>>xlabel('x')>>ylabel('y')>>x=-5:5x=Columns1through9-5-4-3-2-10123Columns10through1145>>y=xy=Columns1through9-5-4-3-2-10123Columns10through1145>>[X,Y]=meshgrid(x,y)X=Columns1through9-5-4-3-2-10123-5-4-3-2-10123-5-4-3-2-10123-5-4-3-2-10123-5-4-3-2-10123-5-4-3-2-10123-5-4-3-2-10123-5-4-3-2-10123
3、-5-4-3-2-10123-5-4-3-2-10123-5-4-3-2-10123Columns10through114545454545454545454545Y=Columns1through9-5-5-5-5-5-5-5-5-5-4-4-4-4-4-4-4-4-4-3-3-3-3-3-3-3-3-3-2-2-2-2-2-2-2-2-2-1-1-1-1-1-1-1-1-1000000000111111111222222222333333333444444444555555555Columns10through11-5-5-4-4-3-3-2-2-1-1001122334455
4、>>z=X.^2+Y.^2z=Columns1through85041342926252629413225201716172034251813109101329201385458261710521252516941014261710521252920138545834251813109101341322520171617205041342926252629Columns9through1134415025324118253413202910172691625101726132029182534253241344150>>mesh(X,Y,z)三位曲线图>>surf(X,Y,z)三维
5、曲面绘图函数
此文档下载收益归作者所有