收藏 分享(赏)

绘图2.ppt

上传人:fmgc7290 文档编号:8697859 上传时间:2019-07-08 格式:PPT 页数:10 大小:209KB
下载 相关 举报
绘图2.ppt_第1页
第1页 / 共10页
绘图2.ppt_第2页
第2页 / 共10页
绘图2.ppt_第3页
第3页 / 共10页
绘图2.ppt_第4页
第4页 / 共10页
绘图2.ppt_第5页
第5页 / 共10页
点击查看更多>>
资源描述

1、31 图形绘制,一、绘制图形 plot函数可绘制出给定数据的函数。 例如:绘制出正弦函数曲线t=0:.01:1;y=sin(2*pi*5*t);plot(t,y), grid on 控制曲线的颜色和类型, 例如plot(t,y,r-), grid on,31 图形绘制,可采用的符号有:(见教材P125),31 图形绘制,可采用的符号有:(见教材P125),32 图形标注(续),字符序列 字符 字符序列 字符 alpha phi beta psi gamma omega delta Gamma epsilon Delta zeta Theta eta Lambda theta Pi lambda

2、 Sigma mu Phi ,见教材P136,32 图形标注(续),字符序列 字符 字符序列 字符 pi Psi rho Omega sigma forall div exists ldots . sim leq geq infty leftrightarrow leftarrow rightarrow uparrow downarrow pm propto partial circ ,见教材P136,32 图形标注(续),字符串中可使用中文汉字。 还可以改变字符的字体: rm 正体 bf 黑体 it 斜体 sl 倾斜体 fontnamefontname 指定使用的字体 fontsizefon

3、tsize 指定使用的字体尺寸 上下标采用: string 上标 _string 下标,见教材P137,32 图形标注(续),title(bf正弦曲线), xlabel(itt), ylabel(ity),32 图形标注(续),title(it x2 y_122),xlabel(itt),ylabel(ity_2),34 复杂图形绘制(续),利用text函数, 采用其它字符标注: x=0:pi/50:2*pi; y1=sin(x); y2=cos(x); figure(1) plot(x,y1,k-,x,y2,k-), grid on text(pi,0,leftarrow sin(alpha

4、) text(pi/4-0.05,0,cos(alpha) rightarrow) title(sin(alpha)和cos(alpha) xlabel(alpha), ylabel(sin(alpha)和cos(alpha),35颜色控制,颜色控制:x=-pi:pi/20:pi; y=exp(-2*sin(x); figure(1) plot(x,y,r-), grid on xlabel(兰色的x轴标注,Color,b) ylabel(兰色的y轴标注,Color,b) title(绿色的标题(y=e-2sin(x),Color,g) text(-0.6,3.8,leftarrow黑色的曲线标注,Color,k),

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 企业管理 > 管理学资料

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报