Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function freq_rate(f,u)
- %Message Signal
- Am = 5;
- fm = 2000;
- t = 0:(1/(fm*999)):6/fm;
- Mt = Am*sin(2*pi*fm*t);
- %Carrier Signal
- Ac = Am/u;
- fc = f;
- Mc = Ac*cos(2*pi*fc*t);
- Mm = Mc.*Mt;
- tt = Mm.*Mc;
- [b,a] = butter(Am,0.5,'low');
- Og = filter(b,a,tt);
- subplot(4,1,1)
- plot(t,Mt)
- title("Message")
- subplot(4,1,2)
- plot(t,Mc)
- title("Carrier")
- subplot(4,1,3)
- plot(t,Mm)
- title("Modulation")
- subplot(4,1,4)
- plot(t,Og)
- title("Original Signal")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement