If you are trying to plot the step and impulse responses of your transfer function you need to call step() and impulse() as functions instead of assigning values to them as variables.
I think it is now recommended to create a transfer function object rather than using the (num, den) arguments to step() and impulse(),
So, try this (I don't currently have the control system toolbox so I can't test this, but I think it should work).
n1 = 1;
n2 = 25;
den = [1 6 25];
figure
sys1 = tf(n1, den);
step(sys1);
title('Transfer function when numerator = 1')
figure
sys2 = tf(n2, den);
impulse(sys2);
title('Standard transfer function')
2 Comments
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/562616-what-is-wrong-with-this-code#comment_932660
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/562616-what-is-wrong-with-this-code#comment_932660
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/562616-what-is-wrong-with-this-code#comment_946311
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/562616-what-is-wrong-with-this-code#comment_946311
Sign in to comment.