问题:MATLAB中产生周期矩形波,怎样才能产生理想的矩形波?
两段程序:,
第一:clc;clear;
t = 0:1:100;
w=50;
y=square(0.5*t,w);
plot(t,y);
ylim([-6.5 6.5])
grid
第二段就第一句变化其他一样:t = 0:0.1:100;