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 中查找有关 Multidimensional Arrays 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by