The question is like this:(adsbygoogle = window.adsbygoogle || []).push({});

a.The amplitude modulation(AM)waveform in time and frequency domain.

fm=20HZ,fc=500HZ,Vm=1V,Vc=1V,t=0:0.00001:0.09999

a.The frequency modulation(FM)waveform in time and frequency domain.

fm=250HZ,fc=5KHZ,Vm=1V,Vc=1V,m=10,t=0:0.00001:0.09999

Then my program is like this:

% setting

fm=20;

fc=500;

vm=1;

vc=1;

interval=0.001;

% x-axis:Time(second)

t=0:0.00001:0.09999;

f=0:1:9999;

% y-axis:Voltage(volt)

wc=2*pi*fc;

wm=2*pi*fm;

V1=vc+vm*sin(wm*t);

V2=-(vc+vm*sin(wm*t));

Vm=vm*sin(wm*t);

Vc=vc*sin(wc*t);

Vam=(1+sin(wm*t)).*(sin(wc*t));

Vf=abs(fft(Vam,10000))/10000;

% Plot figure in time domain

figure;

plot(t,Vam);

hold on;

plot(t,V1,'r'),plot(t,V2,'r');

title('AM waveform time-domain');

xlabel('time'), ylabel('amplitude');

grid on;

% Plot figure in frequency domain

figure;

plot(f*10,Vf);

axis([(fc-2*fm) (fc+2*fm) 0 0.6]);

title('AM waveform frequency-domain');

xlabel('frequency'), ylabel('amplitude');

grid on;

%Plot modulating signal

figure;

plot(t,Vm);

title('AM modulating signal');

xlabel('time'), ylabel('amplitude');

grid on;

%Plot carrier signal

figure;

plot(t, Vc);

title('AM carrier signal');

xlabel('time'), ylabel('amplitude');

grid on;

clear;

Is it correct?It is AM program.If it is wrong can u help me correct it?

% setting

vc=1;

vm=1;

fm=250;

fc=5000;

m=10;

% x-axis:Time(second)

t=0:0.00001:0.09999;

f=0:10:99990;

% y-axis:Voltage(volt)

wc=2*pi*fc;

wm=2*pi*fm;

sc_t=vc*cos(wc*t);

sm_t=vm*cos(wm*t);

kf=1000;

s_fm=vc*cos((wc*t)+10*sin(wm*t));

vf=abs(fft(s_fm,10^4))/5000;

% Plot figure in time domain

figure;

plot(t,s_fm);

hold on;

plot(t,sm_t,'r');

axis([0 0.01 -1.5 1.5]);

xlabel('time(second)'),ylabel('amplitude');

title('FM time-domain');

grid on;

% Plot figure in frequency domain

figure;

plot(f,vf);

axis([ 0 10^4 0 0.4]);

xlabel('frequency'), ylabel('amplitude');

title('FM frequency-domain');

grid on;

%Plot modulating signal

figure;

plot(t,sm_t);

axis([0 0.1 -1.5 1.5]);

title('FM modulating signal');

This is FM.

And can let me know what can i get discussion and conclution from this two program?I not very sure i understand what is it doing......

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matlab problem about AM and FM

Loading...

Similar Threads for Matlab problem | Date |
---|---|

Does anyone had this plotting problem with MATLAB? | Dec 23, 2017 |

Matlab map representation problems | Feb 11, 2017 |

MATLAB Problem with Generating Barnsley Fern Fractal in MATLAB | Sep 21, 2016 |

Problem of plotting picture and video in Linux HPC | Dec 3, 2015 |

Problem with Matlab | Sep 4, 2015 |

**Physics Forums - The Fusion of Science and Community**