eyestrainx
Junior Member level 2
I have write the followings.
My target to have a square wave, where y=0 at 0<=x<=30, y=1 at 30<=x<=60 and y=0 at 60<=x<=100.
x = 30:0.1:60;
y = square(2*pi*25*x,100);
plot(x,y)
but it only works at 30<=x<=60
anybody can help this?
My target to have a square wave, where y=0 at 0<=x<=30, y=1 at 30<=x<=60 and y=0 at 60<=x<=100.
x = 30:0.1:60;
y = square(2*pi*25*x,100);
plot(x,y)
but it only works at 30<=x<=60
anybody can help this?