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 views (last 30 days)
Show older comments
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)
0 Comments
Answers (1)
dpb
on 17 Jun 2017
Edited: dpb
on 18 Jun 2017
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.
0 Comments
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!