Hi i am getting an error in this MATLAB code and im not sure whats wrong with it. %define verialbe lm=0.01; Rm=0.05; Kt=1.2; Kb=4.0; B=0.25; J=10.0; %coeff of denominator a0=((Rm/Kt)+Kb); a1=(lm*B+Rm*J)/Kt; a2=((lm*J)/Kt); %define numerator and demenator num=[1]; den=[a2 a1 a0]; %define TF Gopen=tf(num,den) % step(Gopen) The error is coming from line 24 which is Gopen=tf(num,den) so can anyone help me.
Kshitij Singh answered .
2025-11-20
%define variable lm=0.01; Rm=0.05; Kt=1.2; Kb=4.0; B=0.25; J=10.0; %coeff of denominator a0=((Rm/Kt)+Kb); a1=(lm*B+Rm*J)/Kt; a2=((lm*J)/Kt); %define numerator and denominator num=[1]; den=[a2 a1 a0]; %define TF Gopen=tf(num,den)
Gopen =
1
------------------------------
0.08333 s^2 + 0.4187 s + 4.042
Continuous-time transfer function.
and
step(Gopen)
produces:
