필터 지우기
필터 지우기

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 CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by