Effacer les filtres
Effacer les filtres

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 vues (au cours des 30 derniers jours)
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)

Réponses (1)

dpb
dpb le 17 Juin 2017
Modifié(e) : dpb le 18 Juin 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.
See the doc <ORD2> for example usage, discussion.

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by