Remove offset and delay of step response

9 visualizaciones (últimos 30 días)
Yasmine Sellwood
Yasmine Sellwood el 7 de Sept. de 2021
Respondida: Sulaymon Eshkabilov el 7 de Sept. de 2021
I need to remove the offsets and delays of the step response from the code below so that the step response starts at t = 0s. I've attached a photo of the figure for further explanation. Does anyone have any suggestions on how I would do that?
% Creating a plot to show step input and step response
figure
x = T(:, 1); % Time (s)
y = T(:, 2); % Channel 1 - step input
plot(x,y)
hold on
yn_random = T(:, 3); % Channel 2 - step response
plot(x, yn_random);
title('Open Loop Step Response');
xlabel('t (s)')
ylabel('V_p (v)')
legend('2V Step Input','Step Response')
hold off

Respuestas (1)

Sulaymon Eshkabilov
Sulaymon Eshkabilov el 7 de Sept. de 2021
(1) Start at t=0:
...
N = numel(x);
x = linspace(0, 5, N);
(2) Remove the offset:
yoff=0.5;
y = T(:, 2)-yoff; % Channel 1 - step input
...

Community Treasure Hunt

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

Start Hunting!

Translated by