フィルターのクリア

Remove offset and delay of step response

7 ビュー (過去 30 日間)
Yasmine Sellwood
Yasmine Sellwood 2021 年 9 月 7 日
回答済み: Sulaymon Eshkabilov 2021 年 9 月 7 日
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

回答 (1 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 9 月 7 日
(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
...

カテゴリ

Help Center および File ExchangePulsed Waveforms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by