Single Side Band Suppressed Carrier (SSB - SC) - Demodulation Scilab code

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

Requirements: PC with Scilab software

Program:

Clf
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)
dsb1=m.*c
m1=imag(hilbert(m))      
c1=imag(hilbert(c))
dsb2=m1.*c1
su=dsb1-dsb2
sa=dsb1+dsb2     //continueos from hilbert program                                          
Y1=su.*c     // or sa.*c
C1=input(‘enter the capacitance value’)
R=1/(2*(%pi)*F1*C1)
H=(1/(R*C1)*exp(-t/(R*C1)))
Y2=conv(H,conv(H,M1))
T1=0:Fs:(length(Y2)-1)*T/Fs
subplot(3,1,3)
plot2d1(T1,Y2)