How can I fix this error?

K
kmuhfht · Feb 12, 2020 · 2.5K views
Question
How can I fix this error?   sys=tf([1 1 1 1],[1 1]); t=0:0.1:10; step(sys,t) ??? Error using ==> DynamicSystem.step at 84 Cannot simulate the time response of models with more zeros than poles. I know that my system is unstable but how can I receive an "unstable" graph for this system on my axes?
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Aug 21, 2026

Just FYI the following code won't provide the same graph has the step function, it just plots the function having s as the variable, the step fuction just works for proper systems (n poles >= n zeros).

"Impulse response":

syms s
TFC=evalc('tf([1 1 1 1],[1 1])');
[a b] = strread(TFC, '%s %s', 'delimiter',char(10));
num=sym(char(a(2)));
den=sym(char(a(3)));
ezplot(num/den,[0 100])

"Step response"

syms s 
TFC=evalc('tf([1 1 1 1],[1 1 0])');
[a b] = strread(TFC, '%s %s', 'delimiter',char(10)); 
num=sym(char(a(2))); 
den=sym(char(a(3))); 
ezplot(num/den,[0 100])
The scales aren't the same like you get with the step function.
100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!