How to plot the switching signal in matlab?

3 views (last 30 days)

Accepted Answer

Bhaskar R
Bhaskar R on 3 Nov 2019
t=0:0.01:25; %time vector
width = 4; % train width
dela = width/2:width*2:25; % delays
pulse_vect=pulstran(t,dela,'rectpuls',width) + 1; % 1 is offset
% Plottig
figure, plot(t,pulse_vect, 'LineWidth', 2);
ylim([0, 2.5]), title('Not given')
xlabel('Time(s)'); ylabel('\sigma')

More Answers (1)

amani alsulami
amani alsulami on 12 Nov 2019
I did not understand the code

Community Treasure Hunt

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

Start Hunting!