How do I generate a nano second rectangular pulse function in Matlab (Using 'rectpuls()')?

4 次查看(过去 30 天)
When I am plotting this from t=0 to t=10^-6 the program is not running.
t = 0 : 1/1e6 ; 1;
w = 0: 1/1e9 : 1;
pulse = rectpuls(t,w);
x = 0:1/1e-3:1;
plot(x,pulse)

回答(1 个)

Walter Roberson
Walter Roberson 2016-1-26
w, the width, is expected to be a scalar for rectpuls

类别

Help CenterFile Exchange 中查找有关 Simulink 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by