How to make rectangular train?

4 visualizaciones (últimos 30 días)
Jin You
Jin You el 26 de Mayo de 2020
Comentada: Star Strider el 26 de Mayo de 2020
I want to make a signal like above.
I made a signal when T=2, but I can't draw a graph when T=4,8,16.
Can you help me?
T=2
<code>
clear;
close all;
clc;
t=-5:0.001:5;
T=2;
y=square(pi*(t+0.5))/2+0.5;
plot(t,y)

Respuesta aceptada

Star Strider
Star Strider el 26 de Mayo de 2020
See if the pulstran function will do what you want.
  2 comentarios
Jin You
Jin You el 26 de Mayo de 2020
thank you so much. That's very helpful.
Star Strider
Star Strider el 26 de Mayo de 2020
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by