求助用matlab 函数square产生一个振幅为1,周期为2,占空比为50%的方波并画图
如果用square函数,该怎么做呢?
t = 0:.01:6; y = SQUARE(pi*t); plot(t,y,'-r'),grid