主要内容

搜索

Hello

I would like to pulse an input species. I read in the forums that repeated assignments can be used for this, but I am not exactly sure how to implement this. This is the MATLAB code that resembles what I would like the input pattern to be:

t = 0:1/1e3:60;
d = [10:2:30]';
x = @rectpuls;
y = pulstran(t,d,x);
plot(t,y)
hold off
xlabel('Time (s)')
ylabel('Waveform')

Thanks for any help! Aaron