生成一个方波

mac2022-06-30  24

x=0:0.0001:100; y=zeros(1,1000001); for i=1:1:1000 y=y+sin(i*pi/2)*((1/i)*cos(i*x)); end plot(x,y);

 

最新回复(0)