How to generate one square pulse like this one in the picture, where I need to save the pulse in an array

답변 (1개)

Star Strider
Star Strider 2020년 11월 23일

0 개 추천

Try this:
sqpuls = @(t,t1,t2) (t>= t1) & (t <= t2);
t = linspace(-1, 1);
figure
plot(t, sqpuls(t, -0.5, 0.5), '-r')
grid
ylim(ylim*1.1)
Experiment to get the result you want.

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

질문:

2020년 11월 23일

답변:

2020년 11월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by