Demo entry 6640742

matlab

   

Submitted by anonymous on Sep 13, 2017 at 13:25
Language: Matlab. Code size: 664 Bytes.

%Ææ¶Ô³Æ·½²¨ºÏ³É
t=0:0.001:0.1;
sishu=12/pi;
y=sishu*sin(100*pi*t);
subplot(221)
plot(t,y);
axis([0,0.1,-4,4]);
xlabel('time');
ylabel('Ç°1 ÏîÓÐÏÞ¼¶Êý');
y=sishu*(sin(100*pi*t)+sin(3*100*pi*t)/3);
subplot(222);
plot(t,y);
axis([0,0.1,-4,4]);
xlabel('time');
ylabel('Ç°2 ÏîÓÐÏÞ¼¶Êý');
y=sishu*(sin(100*pi*t)+sin(3*100*pi*t)/3+sin(5*100*pi*t)/5+sin(7*100*pi*t)/7+sin(9*100*pi*t)/9);
subplot(223)
plot(t,y);
axis([0,0.1,-4,4]);
xlabel('time');
ylabel('Ç°5 ÏîÓÐÏÞ¼¶Êý');
t=0:0.001:0.1;
y=0;
for i=1:100
	y=y+sishu*(sin((2*i-1)*100*pi*t)/(2*i-1));
end
subplot(224);
plot(t,y);
axis([0,0.1,-4,4]);
xlabel('time');
ylabel('Ç°100 ÏîÓÐÏÞ¼¶Êý');

This snippet took 0.01 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).