フィルターのクリア

I am facing the dimension error during generating the second order transfer function can any one help me please. i have attached the error pic and code as well.

2 ビュー (過去 30 日間)
filename = 'datacollect2.xlsx';
num = xlsread(filename,'B1:B60');
w = num/60;
N = length(num);
t = 1/w;
s = xlsread(filename,'B3:B3');
xt= s;
g = 1/N;
v = xlsread(filename,'B60:B60');
h = xt./ v ;
ln=@log;
q=ln(h);
zeta = g .* q;
[num,den] = ord2(w,zeta);
sys = tf(M);
step(sys)

回答 (1 件)

dpb
dpb 2017 年 6 月 17 日
編集済み: dpb 2017 年 6 月 18 日
ord2 generates the num,den for a system given the natural frequency wn (ωn) and damping factor z (ζ). It is not a vectorized function; both wn and z need to be constants. You've passed a vector for wn that can't be multiplied by itself.
Multiple values for a system natural frequency don't really make sense, anyway; if you mean to be modelling the system response as a function of changing that as a parameter you'd call ord2 in a loop with the given combination.
See the doc <ORD2> for example usage, discussion.

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by