09-05-2017 03:27 PM
The code is
delta_t=1/f_s
start=0
step=t
stop=(N-1)*delta_t
t=start:step:stop
A=input('enter amplitude of the wave');
fmod=input('enter modulation frequency');
fsig=input('enter signal frequency');
ym=A*sin(2*pi*fmod*t);
ys=sin(2*pi*fsig*t);
y=(A+ym)*sin(2*pi*fsig*t)
subplot(3,1,1)
plot(t,y);
09-05-2017 05:07 PM
You have step = t, do you want to have step = delta_t?
09-07-2017 03:55 PM
I have written a MATH script code to plot the AM wave. I think there is some error, because I am getting a straight line instead of wave pattern.
Thanks in advance for your help
09-07-2017 04:04 PM
Please do not create a new topic, respond to your original post:
09-07-2017 06:09 PM
Merged the threads.