DSB-SC  Demodulation program scilab

Aim: Write scilab code to get the DSB-SC Amplitude De-Modulation 

Requirements: PC with Scilab software

Program:

F1=input(‘enter the baseband signal frequency’)
F2=input(‘enter the carrier signal frequency’)
Fs=input(‘enter the sampling frequency’)
T=input(‘enter the duration of signal’)
t=0:T/Fs:T
m=cos(2*%pi*F1*t)        // use %pi=&pi for MATLAB
c=cos(2*%pi*F2*t)
M=m.*c
M1=M.*c
C1=input(‘enter the capacitance value’)
R=1/(2*(%pi)*F1*C1)
H=(1/(R*C1)*exp(-t/(R*C1)))
Y1=conv(H,conv(H,M1))
T1=t
T1(length(t+1):length(Y1))=t(length(t)) subplot(2,1,1) plot2d1(t,M) subplot(2,1,2) plot2d1(T1,Y1)