How do I plot biphasic pulses with following parameters: N = 400 (number of pulses), Tp = 1 (pulse width), d1 = 1 (interphase delay [us]), d2 = 1 (interpulse delay [us]). Let's say the U0=1V. It should look something like this:

 채택된 답변

Chunru
Chunru 2024년 3월 22일
편집: Chunru 2024년 3월 22일

0 개 추천

N = 4; %400; % number of pulses
Tp = 1; % pulse width;
d1 = 1; % interphase delay
d2 = 1; % interpulse delay [us]).
U0 = 1;
% define sampling freq
fs = 10; % MHz (time in us)
% single pulse
x1 = [ ones(round(Tp*fs), 1) % +ve pulse
zeros(round(d1*fs), 1) % d1
-ones(round(Tp*fs), 1) % -ve pulse
zeros(round(d2*fs), 1)]; % d2
x = U0*repmat(x1, N, 1);
t = (0:length(x)-1)/fs;
stairs(t, x);
grid on
ylim([-1 1]*1.5*U0)

댓글 수: 2

Marina Babic
Marina Babic 2024년 3월 26일
Thank you!!
Marina Babic
Marina Babic 2024년 4월 4일
Is there any chance that these pulses could be generated on a similar way like :
bipolar_pulses = amplitude*square(2*pi*frequency*time);
to be dependent on the time variable.. because they are part of the ode15s function, which generates its own time variable.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

질문:

2024년 3월 22일

댓글:

2024년 4월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by