matlab attempt to execute,matlab运行时出现??? Attempt to execute SCRIPT freqs_m as a function:...

满意答案

02ae427d08e371d7e90d5b995e828d6d.png

maop网友

2013.12.31

02ae427d08e371d7e90d5b995e828d6d.png

采纳率:55%    等级:12

已帮助:12413人

找不到函数的脚本文件,也就是你的运行路径下调不到freqs_m函数。下面有代码,在你的程序运行路径下存成freqs_m.m就可以了。

function [db,mag,pha,w] = freqs_m(b,a,wmax);

% Computation of s-domain frequency response: Modified version

% ------------------------------------------------------------

% [db,mag,pha,w] = freqs_m(b,a,wmax);

% db = Relative magnitude in db over [0 to wmax]

% mag = Absolute magnitude over [0 to wmax]

% pha = Phase response in radians over [0 to wmax]

% w = array of 500 frequency samples between [0 to wmax]

% b = Numerator polynomial coefficents of Ha(s)

% a = Denominator polynomial coefficents of Ha(s)

% wmax = Maximum frequency in rad/sec over which response is desired

%

w = [0:1:500]*wmax/500;

H = freqs(b,a,w);

mag = abs(H);

db = 20*log10((mag+eps)/max(mag));

pha = angle(H);

01分享举报

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值