Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function [ ] = CPSLAB1( )
- f1=290;
- f2=444;
- fs=3000;
- td=1/fs;
- t=0:td:0.1;
- sinusek=sin(2*pi*f1*t)+sin(2*pi*f2*t)+1;
- figure(1)
- subplot(3,1,1); plot(t,sin(2*pi*f1*t));
- subplot(3,1,2); plot(t,sin(2*pi*f2*t));
- subplot(3,1,3); plot(t,sinusek);
- Y = fft(sinusek);
- dlugosc=length(Y);
- f=linspace(0,fs,dlugosc);
- figure(2)
- plot(f,abs(Y));
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement