summaryrefslogtreecommitdiff
path: root/2951/CH3/EX3.2.A/additional_ex_2.sce
blob: fd46a85b50f05d90d3ee7960d9c1dfaabe694483 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
clear;
clc;


Fm=3; //frequency of message signal
Fc=8; //frequency of carrier signal
Ea=5;
Eb=10;
m=Ea/Eb; //modulation index

disp(m,"m=");
USf=Fc+Fm*10^(-3);//Upper Sideband frequency
LSf=Fc-Fm*10^(-3);//Lower sideband frequency
disp(USf,"USf(Mhz)=");
disp(LSf,"LSf(Mhz)=");
Amp=m*Eb/2;// amplitude of each sideband
disp(Amp,"amp(v)=");



function[x,Vm,Vc]=ampmod(Ea,Eb,m,Fc,Fm)
    t=0:0.005:5;
    
    Vm = Ea*sin(2*%pi*Fm*t);
    Vc = Eb*sin(2*%pi*Fc*t);
   
    x = ((Eb+Ea*sin(2*%pi*Fm*t))).*(sin(2*%pi*Fc*t));
    
    subplot(3,1,2);
    plot2d(t,x);
    title('Amplitude Modulated Signal');
endfunction

ampmod(Ea,Eb,m,Fc,Fm)//amplitude modulation