Remove offset and delay of step response
17 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
0 commentaires
Réponses (1)
Sulaymon Eshkabilov
le 7 Sep 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
...
0 commentaires
Voir également
Catégories
En savoir plus sur Pulsed Waveforms dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!