matlab课件第三章.ppt

上传人:sh****n 文档编号:6380127 上传时间:2020-02-24 格式:PPT 页数:30 大小:7.44MB
返回 下载 相关 举报
matlab课件第三章.ppt_第1页
第1页 / 共30页
matlab课件第三章.ppt_第2页
第2页 / 共30页
matlab课件第三章.ppt_第3页
第3页 / 共30页
点击查看更多>>
资源描述
6 图形加注功能 LaTeX字符p88 将标题 坐标轴标记 网格线及文字注释加注到图形上 这些函数为 title 给图形加标题xlable 给x轴加标注ylable 给y轴加标注text 在图形指定位置加标注gtext 将标注加到图形任意位置gridon off 打开 关闭坐标网格线legend 添加图例axis 控制坐标轴的刻度 例 t 0 0 1 10y1 sin t y2 cos t plot t y1 r t y2 b x 1 7 pi 1 6 pi y 0 3 0 8 s sin t cos t text x y s title 正弦和余弦曲线 legend 正弦 余弦 xlabel 时间t ylabel 正弦 余弦 Gridon axissquare 2 4 6 8 10 时间t axis的用法还有 axis xminxmaxyminymax 用行向量中给出的值设定坐标轴的最大和最小值 如axis 2205 axis equal 将两坐标轴设为相等axison off 显示和关闭坐标轴的标记 标志axisauto 将坐标轴设置返回自动缺省值 7 fplot 绘制函数图 自适应采样 p96 fplot的调用格式 fplot fun lims 绘制函数fun在x区间lims xminxmax 的函数图 fplot fun lims corline 以指定线形绘图 x y fplot fun lims 只返回绘图点的值 而不绘图 用plot x y 来绘图 fplot sin x tan x cos x 2 pi 11 11 fplot humps 01 rp fplot sin x 02 pi 8 ezplot 符号函数绘图 隐函数 p112 ezplot f 这里f为包含单个符号变量x的符号表达式 不易求解的 在x轴的默认范围 2 pi2 pi 内绘制f x 的函数图ezplot f xmin xmax 给定区间ezplot f xmin xmax figure n 指定绘图窗口绘图 ezplot sin x ezplot sin x cos y 4 pi4 pi figure 2 ezplot sin x ezplot sin x cos y 4 pi4 pi figure 2 ezplot x y tmin tmax fig ezplot sin 3 t cos t sin 3 t sin t 0 pi ezplot t cos t t sin t 0 4 pi figure 2 二 fill 基本二维绘图函数fill的功能 绘制二维多边形并填充颜色例 x 12345 y 41514 fill x y r 三 特殊二维绘图函数 bar 绘制直方图polar 绘制极坐标图hist 绘制统计直方图stairs 绘制阶梯图stem 绘制火柴杆图rose 绘制统计扇形图comet 绘制彗星曲线 errorbar 绘制误差棒图compass 复数向量图 罗盘图 feather 复数向量投影图 羽毛图 quiver 向量场图area 区域图pie 饼图convhull 凸壳图scatter 离散点图 例 绘制阶梯曲线x 0 pi 20 2 pi y sin x stairs x y 例 阶梯绘图h2 11 1 1 h4 h2h2 h2 h2 h8 h4h4 h4 h4 t 1 8 subplot 8 1 1 stairs t h8 1 axis off subplot 8 1 2 stairs t h8 2 axis off subplot 8 1 3 stairs t h8 3 axis off subplot 8 1 4 stairs t h8 4 axis off subplot 8 1 5 stairs t h8 5 axis off subplot 8 1 6 stairs t h8 6 axis off subplot 8 1 7 stairs t h8 7 axis off subplot 8 1 8 stairs t h8 8 axis off h2 11 1 1 h4 h2h2 h2 h2 h8 h4h4 h4 h4 t 1 8 fori 1 8subplot 8 1 i stairs t h8 i axis off end 例 绘制极坐标绘图t 0 2 pi 90 2 pi y cos 4 t polar t y 例 绘制火柴杆绘图t 0 0 2 2 pi y cos t stem y 例 绘制直方图t 0 0 2 2 pi y cos t bar y 例 绘制彗星曲线图t pi pi 500 pi y tan sin t sin tan t comet t y x magic 6 area x x 1234567 y 0001000 pie x y pie x y North South East West middle fa white loadseamountscatter x y 50 z a rand 200 1 b rand 200 1 c rand 200 1 scatter a b 100 c p
展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 图纸专区 > 课件教案


copyright@ 2023-2025  zhuangpeitu.com 装配图网版权所有   联系电话:18123376007

备案号:ICP2024067431-1 川公网安备51140202000466号


本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。装配图网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知装配图网,我们立即给予删除!