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 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/165237/image.png)
0 Kommentare
Antworten (1)
dpb
am 17 Jun. 2017
Bearbeitet: dpb
am 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 Kommentare
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!