Matlab plots step response vs timestep number instead of time in seconds
s = tf(‘s’); %Laplace variable
t = 0:0.01:10; %time vector start, dt , end
K = 1;
KI = 0;
sysT = (K * s + KI) / ( ( s^3 + 3*s^2 + (2+K)*s + KI) );
[y,t] = step(sysT,t);
plot(y);
Above snippet shows issue. The issue is that plot(y); plots the step response vs the number of timesteps instead of vs time in secs. For instance if dt = 0.01, the abcissa is in the 100’s. If dt = 0.001, the abcissa is in the 1000’s. If dt = 0.0001, the abcissa is in the 10000’s. How can I just plot vs time in seconds??s = tf(‘s’); %Laplace variable
t = 0:0.01:10; %time vector start, dt , end
K = 1;
KI = 0;
sysT = (K * s + KI) / ( ( s^3 + 3*s^2 + (2+K)*s + KI) );
[y,t] = step(sysT,t);
plot(y);
Above snippet shows issue. The issue is that plot(y); plots the step response vs the number of timesteps instead of vs time in secs. For instance if dt = 0.01, the abcissa is in the 100’s. If dt = 0.001, the abcissa is in the 1000’s. If dt = 0.0001, the abcissa is in the 10000’s. How can I just plot vs time in seconds?? s = tf(‘s’); %Laplace variable
t = 0:0.01:10; %time vector start, dt , end
K = 1;
KI = 0;
sysT = (K * s + KI) / ( ( s^3 + 3*s^2 + (2+K)*s + KI) );
[y,t] = step(sysT,t);
plot(y);
Above snippet shows issue. The issue is that plot(y); plots the step response vs the number of timesteps instead of vs time in secs. For instance if dt = 0.01, the abcissa is in the 100’s. If dt = 0.001, the abcissa is in the 1000’s. If dt = 0.0001, the abcissa is in the 10000’s. How can I just plot vs time in seconds?? plot vs timestep number MATLAB Answers — New Questions