📄 nbastrom.m
字号:
function I=NB(num,den);
% Calculation of Noise Bandwidth using Astrom's theory;
% num - numerator coeff. array of TF;
% den - denominator coeff. array of TF;
% Same length of num and den is required;
% Written by Paul Wong, Mar 7th, 2008
% Important!!!
% When dealing with symbolic parameters, Both num & den have to be transformed into sym format first.
I=0;
A=den;
B=num;
n=length(num);
for k=2:length(num)
if isnumeric(A(k-1,1)) && A(k-1,1)<=0
error('Not a steady system. Eigen coefficient(s) not positive.')
end
for i=1:n-k+1
A(k,i)=A(k-1,i)-(A(k-1,n-k+2)/A(k-1,1))*A(k-1,n+3-k-i);
B(k,i)=B(k-1,i)-(B(k-1,n-k+2)/A(k-1,1))*A(k-1,n+3-k-i);
end
end
for i=1:n
I=I+B(i,n-i+1)^2/A(i,1);
end
I=I/A(1,1);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -