- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
matlab代码(matlab代码)
matlab代码(matlab代码)
n = 7: 12;
y = 1 / ((n 6);
plot (n, y, r, markersize, 20)
grid on
/ / 画图
x = linspace (0.2 * pi, 100);
y = sin (x).
plot (x, y).
加注解
x = linspace (0.2 * pi, 100);
y = sin (x).
plot (x, y).
x = linspace (0.2 * pi, 100);
y = sin (x).
plot (x, y, r, x, y, );
legend (y = sin (x))
text (1.4,0.91, 波峰 )
xlabel (input value).
ylabel (function value);
title (一个正弦函数);
/ / axis命令控制坐标轴
x = linspace (0.2 * pi, 100);
y = sin (x).
z = cos (x).
plot (x, y, x, z).
axis on
axis (square)
axis (equal)
/ / plot函数
t = (0, pi / 100: pi);
y1 = sin (t) * [1, 1].
y2 = sin (t) sin (9 * t);
t3 = pi * (0 9) / 9;
y3 = sin (t3) * sin (9 * t3);
plot (t, 1, r, t, y2, b, t3, y3, bo)
axis ([0, pi, - 1,1])
/ / hold on 命令 不会取消之前画的曲线
hold on
y4 = - 1: 0.2: 1;
plot (1.5, y4, *)
/ / 同一窗口用不同的坐标系绘制几组数据
subplot (2,2,1); plot (x, sin (x));
subplot (2,2,2); plot (x, cos (x));
subplot (2,2,3); plot (x, sinh (x));
subplot (2,2,4); plot (x, cosh (x));
/ / figure函数
x = linspace (0.2 * pi, 30);
figure
plot (x, sin (x));
xlabel (input value).
ylabel (function value);
title (一个正弦函数);
legend (y = sin (x))
figure
plot (x, sinh (x));
close
/ / 直方图
close all
x = 1: 10;
y = rand (size (x));
bar (x, y).
x = 1: 10
x = linspace (0,2,20) * pi
y = sin (x)
d = h (y) * ones (size (x));
errorbar (x, y, e)
/ / 柄图
x = linspace (0,10,50);
y = sin (x) * exp (- x / 3);
1 (x, y)
/ / 阶梯图
x = linspace (0,10,50);
y = sin (x) * exp (- x / 3);
stairs (x, y).
/ / 饼图
x = [11.4,23.5,35.4,15.6];
explode = zeros (size (x));
[c], offset = min (x);
explode (offset) = 1;
pic (x, explode);
/ / 频数累计柱状图
x = randn (5000,1);
h (x 20);
/ / 矢量图
/ / 羽状图
theta = 90: 10: 0;
r = ones (size (theta));
[u, v] = pol2cart (theta * pi / 180, r * 10);
feather (u, v)
axis equal
/ / 极坐标图
linspace (theta = 0.2 * pi);
r = cos (4 * theta);
polar (theta r);
/ / 精确绘图
fplot (sin (1 / x), [0.02,0.2]); 0.02,0.2是绘图范围
三维绘图
三维线性图形
= (0: 0.02 to 2 * pi.
x = sin (t).
y
您可能关注的文档
- 512周年盘点 那些被误解的跨国公司(512th anniversary check out the misunderstood multinational companies).doc
- 51程序设计技巧(51 programming skills).doc
- 5730参数(5730 parameter).doc
- 52种胶粘剂有害化学物成分及其含量测定分析(Determination and analysis of harmful chemical composition and content of 52 kinds of adhesives).doc
- 41种粥的做法 学会了去温暖爱的人的胃吧(41 kinds of porridge practice, learned to love the warmth of the stomach!).doc
- 5e-ac8018 发行说明(5e-ac8018 release notes).doc
- 5800编程命令代表什么意思(5800 what does the programming command mean).doc
- 5个简单的方法开始高效率的一天_成功励志_励志一生(5 simple ways to start a efficient day _ inspirational success _ inspirational life).doc
- 5s现场管理培训内容(5S site management training content).doc
- 500位人力资源经理告诉你的面试大忌(500 human resources manager told you the interview blunders).doc
- mm定理(MM theorem).doc
- mp-1000型手动天调(MP-1000 manual weather regulation).doc
- mg-378c型短波多馈多模宽带天线(Mg-378c type short wave multimode multimode wideband antenna).doc
- mp3播放机的工作原理(How does the MP3 player work).doc
- mss滑移模架施工工艺及技术控制(Construction technology and technical control of MSS sliding die set).doc
- msp430单片机系统设计(MSP430 singlechip system design).doc
- mth-6热量表安装使用说明dn15~40(Mth-6 heat meter installation instructions dn15~40).doc
- mysql 5.1安装及编译参数详解(MySQL 5.1 installation and compile parameters detailed).doc
- m开头的女英文名(M begins with a female English name).doc
- mci编程之mcisendcommand(MCI编程之MCISendCommand).doc
文档评论(0)