필터 지우기
필터 지우기

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 CenterFile Exchange에서 Pulsed Waveforms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by