How to make rectangular train?

조회 수: 2 (최근 30일)
Jin You
Jin You 2020년 5월 26일
댓글: Star Strider 2020년 5월 26일
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)

채택된 답변

Star Strider
Star Strider 2020년 5월 26일
See if the pulstran function will do what you want.
  댓글 수: 2
Jin You
Jin You 2020년 5월 26일
thank you so much. That's very helpful.
Star Strider
Star Strider 2020년 5월 26일
As always, my pleasure!

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by