如何用matlab绘制幅频和相频特性图
5个回答
展开全部
1、首先双击matlab软件图标,打开matlab软件,可以看到matlab软件的界面。
2、使用直接输入法创建一个数组u :u=[11,7,16,15,23]; 该数组用来表示一组数据。
3、使用直接输入法创建一个数组e :e=[2,1.3,1.5,3,1]; 该数组用来表示数组u的误差。
4、使用函数errorbar(u,e);绘制误差条图。
5、使用函数title()给误差条图添加标题。使用函数xlabel('u')和ylabel('e'); 给坐标轴添加标签。
6、最后查看绘制的误差条图,就完成了。
2022-12-17 · 百度认证:IT168官方账号,优质数码领域创作者
关注
展开全部
1、在matlab中绘制幅频和相频特性图的命令是area,命令简单,用法多样。
/iknow-pic.cdn.bcebos.com/64380cd7912397ddf309a6a95782b2b7d0a2872e"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/64380cd7912397ddf309a6a95782b2b7d0a2872e?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/64380cd7912397ddf309a6a95782b2b7d0a2872e"/>
2、启动matlab,在命令行窗口输入以下命令。
/iknow-pic.cdn.bcebos.com/34fae6cd7b899e51c3ec04b94ca7d933c8950d38"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/34fae6cd7b899e51c3ec04b94ca7d933c8950d38?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/34fae6cd7b899e51c3ec04b94ca7d933c8950d38"/>
3、得到对应的图形。
/iknow-pic.cdn.bcebos.com/4ec2d5628535e5dd88969b7278c6a7efcf1b62e0"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/4ec2d5628535e5dd88969b7278c6a7efcf1b62e0?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/4ec2d5628535e5dd88969b7278c6a7efcf1b62e0"/>
4、下面将基值下移两个单位。
/iknow-pic.cdn.bcebos.com/6609c93d70cf3bc736fff141df00baa1cc112a9b"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/6609c93d70cf3bc736fff141df00baa1cc112a9b?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/6609c93d70cf3bc736fff141df00baa1cc112a9b"/>
5、可以看到面积图的纵坐标总体下移2个单位。
/iknow-pic.cdn.bcebos.com/2cf5e0fe9925bc31dde23f3550df8db1ca1370db"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/2cf5e0fe9925bc31dde23f3550df8db1ca1370db?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/2cf5e0fe9925bc31dde23f3550df8db1ca1370db"/>
6、下面的命令将面积图的线型由实线改为虚线。
/iknow-pic.cdn.bcebos.com/6609c93d70cf3bc73888f341df00baa1cc112a96"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/6609c93d70cf3bc73888f341df00baa1cc112a96?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/6609c93d70cf3bc73888f341df00baa1cc112a96"/>
7、可以看到面积图的边缘线变成了虚线。
/iknow-pic.cdn.bcebos.com/e7cd7b899e510fb3c287493ad733c895d0430c84"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/e7cd7b899e510fb3c287493ad733c895d0430c84?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/e7cd7b899e510fb3c287493ad733c895d0430c84"/>
8、可以将它的线宽调粗一点。
/iknow-pic.cdn.bcebos.com/b999a9014c086e061b2a01e60c087bf40bd1cb98"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/b999a9014c086e061b2a01e60c087bf40bd1cb98?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/b999a9014c086e061b2a01e60c087bf40bd1cb98"/>
/iknow-pic.cdn.bcebos.com/64380cd7912397ddf309a6a95782b2b7d0a2872e"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/64380cd7912397ddf309a6a95782b2b7d0a2872e?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/64380cd7912397ddf309a6a95782b2b7d0a2872e"/>
2、启动matlab,在命令行窗口输入以下命令。
/iknow-pic.cdn.bcebos.com/34fae6cd7b899e51c3ec04b94ca7d933c8950d38"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/34fae6cd7b899e51c3ec04b94ca7d933c8950d38?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/34fae6cd7b899e51c3ec04b94ca7d933c8950d38"/>
3、得到对应的图形。
/iknow-pic.cdn.bcebos.com/4ec2d5628535e5dd88969b7278c6a7efcf1b62e0"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/4ec2d5628535e5dd88969b7278c6a7efcf1b62e0?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/4ec2d5628535e5dd88969b7278c6a7efcf1b62e0"/>
4、下面将基值下移两个单位。
/iknow-pic.cdn.bcebos.com/6609c93d70cf3bc736fff141df00baa1cc112a9b"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/6609c93d70cf3bc736fff141df00baa1cc112a9b?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/6609c93d70cf3bc736fff141df00baa1cc112a9b"/>
5、可以看到面积图的纵坐标总体下移2个单位。
/iknow-pic.cdn.bcebos.com/2cf5e0fe9925bc31dde23f3550df8db1ca1370db"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/2cf5e0fe9925bc31dde23f3550df8db1ca1370db?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/2cf5e0fe9925bc31dde23f3550df8db1ca1370db"/>
6、下面的命令将面积图的线型由实线改为虚线。
/iknow-pic.cdn.bcebos.com/6609c93d70cf3bc73888f341df00baa1cc112a96"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/6609c93d70cf3bc73888f341df00baa1cc112a96?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/6609c93d70cf3bc73888f341df00baa1cc112a96"/>
7、可以看到面积图的边缘线变成了虚线。
/iknow-pic.cdn.bcebos.com/e7cd7b899e510fb3c287493ad733c895d0430c84"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/e7cd7b899e510fb3c287493ad733c895d0430c84?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/e7cd7b899e510fb3c287493ad733c895d0430c84"/>
8、可以将它的线宽调粗一点。
/iknow-pic.cdn.bcebos.com/b999a9014c086e061b2a01e60c087bf40bd1cb98"target="_blank"title="点击查看大图"class="ikqb_img_alink">/iknow-pic.cdn.bcebos.com/b999a9014c086e061b2a01e60c087bf40bd1cb98?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_600%2Ch_800%2Climit_1%2Fquality%2Cq_85%2Fformat%2Cf_auto"esrc="https://iknow-pic.cdn.bcebos.com/b999a9014c086e061b2a01e60c087bf40bd1cb98"/>
-
官方服务
- 官方网站
- 官方网站
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
关于s/(s^2+2s+5)的幅频特性的实现
方法是将s=jw代入上式中,进行理论分析,或者在s域中画图分析。
可以发现squar(5)是以特殊点。
粗略实现功能:
代码如下:
clf;
clear all; %关于s/(s^2+2s+5)的幅频特性
w=0:0.01:10;
am=[1 0];
fm=[1 2 5];
g=freqs(am,fm,w);
x=angle(g);
y=abs(g);
subplot(2,1,1);
plot(w,x*180/pi);
xlabel('相频特性');
grid;
subplot(2,1,2);
plot(w,y);
xlabel('幅频特性');
grid;
方法是将s=jw代入上式中,进行理论分析,或者在s域中画图分析。
可以发现squar(5)是以特殊点。
粗略实现功能:
代码如下:
clf;
clear all; %关于s/(s^2+2s+5)的幅频特性
w=0:0.01:10;
am=[1 0];
fm=[1 2 5];
g=freqs(am,fm,w);
x=angle(g);
y=abs(g);
subplot(2,1,1);
plot(w,x*180/pi);
xlabel('相频特性');
grid;
subplot(2,1,2);
plot(w,y);
xlabel('幅频特性');
grid;
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
调用bode函数就可以得到
例如:
>> s=tf('s');
>> G=(s+8)/(s*(s^2+0.2*s+4)*(s+1)*(s+3));
>> bode(G)
就可以得到这两个图
例如:
>> s=tf('s');
>> G=(s+8)/(s*(s^2+0.2*s+4)*(s+1)*(s+3));
>> bode(G)
就可以得到这两个图
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询