NaN values for step function.

조회 수: 2 (최근 30일)
Pulkit Sharma
Pulkit Sharma 2018년 3월 10일
T = A(i,1);
K = A(i,2);
if T==0
T=0.001;
end
s = tf('s');
X= ((-1*s^3)+(-1.533*10e-17*s^2)+(0.0001996*s)+9.227*10e-22)/((s^5)+(-2.602*10e-18*s^4)+(0.00378*s^3)+(6.935*10e-21*s^2)+(1.267*10e-6*s));
Y= 0;
Z= ((-0.01994*s^2)+(-3.174*10e-5))/((s^5)+(-2.602*10e-18*s^4)+(0.00378*s^3)+(6.935*10e-21*s^2)+(1.267*10-6*s));
num=[(0.6*(T^2)*K) 4.8*K*T 9.6*K];
den=[8*T 0];
tfPID=tf(num,den);
itf=X+Y+Z;
jtf=itf*tfPID;
ftf=jtf/(1+jtf);
step(ftf);
dt = 20;
t = 0:dt:800;
e = 1 - step(ftf,t);
H = sum(t'.*abs(e)*dt);
My step function, for varying values of T and K, is giving nan values. This is affecting my values in H. How to avoid this? Please help.

답변 (0개)

카테고리

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