Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- close all;
- clear all;
- A=230;
- f=50;
- t=0.1;
- fs1=10000;
- fs2=500;
- fs3=200;
- 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
- hold on
- plot(x1,A*y1,'b-')
- xlabel('second')
- ylabel('Volt')
- plot(x2,A*y2,'ro')
- plot(x3,A*y3,'kx')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement