Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- close all;
- clear all;
- A=230;
- f=50;
- t=1;
- fs1=10000;
- % fs2=51;
- % fs3=50;
- % fs4=49;
- fs2=26;
- fs3=25;
- fs4=24;
- counter=1;
- w=2*pi*f;
- for i=0:1/fs1:t
- x1(counter)=i;
- y1(counter)=sin(w*i);
- counter=counter+1;
- end
- counter=1;
- for i=0:1/fs2:t
- x2(counter)=i;
- y2(counter)=sin(w*i);
- counter=counter+1;
- end
- counter=1;
- for i=0:1/fs3:t
- x3(counter)=i;
- y3(counter)=sin(w*i);
- counter=counter+1;
- end
- counter=1;
- for i=0:1/fs4:t
- x4(counter)=i;
- y4(counter)=sin(w*i);
- counter=counter+1;
- end
- hold on
- plot(x1,A*y1,'b-')
- xlabel('second')
- ylabel('Volt')
- plot(x2,A*y2,'g-o')
- plot(x3,A*y3,'r-o')
- plot(x4,A*y4,'k-o')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement