anyone plzz correct the ammod() function
Error in the ammod() function
20 views (last 30 days)
Show older comments
fm=100; %message freq.
fc=2000; %carrier freq.
fs=10*fc; %sample freq.
Am=8;
Ac=10;
m_index=Am/Ac;
ts=1/fs;
t=0:ts:5*(fs/fm)*ts;
xm=Am*cos(2*pi*fm*t);
xc=Ac*cos(2*pi*fc*t);
z=ammod(xm,fc,fs,0,10);
d=amdemod(z,fc,fs,0,10);
n=length(d);
z=fftshift(fft(d));
f1=(-n/2:n/2-1)*fs/n;
6 Comments
Walter Roberson
on 1 Apr 2019
You need to license and install the Communications Toolbox. It is an optional toolbox that is not included in the Student Bundle.
Answers (1)
Bhukya Sandhya
on 8 Apr 2024 at 5:58
% carrier Frequency
Fc = 200;
% sampling frequency
Fs= 4000;
% time Duration
t = (0 : 1 / Fs : 1);
% sine Wave with time duration of 't'
x = sin(2*pi*t);
% Amplitude Modulation
y = ammod(x, Fc, Fs);
plot(y);
title('Amplitude Modulation');
xlabel('Time(sec)');
ylabel('Amplitude');
0 Comments
See Also
Categories
Find more on Wireless Communications in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!