laham
Newbie level 6
i want to know where is my error in my matlab code ?
i want to record my voice using matlab and modulate it and demodulate using am mathematical procedures (imean not using modand demod commands)
and want to plot the every satge signal and play it.
this is my code
fc=1000;
fs=8000;
ts=1/fs;
Ac=4;
m=0.25;
t=0:ts:4.999875;
c=cos(2*pi*fc*t);
i=wavrecord(5*fs,fs);
plot(t,(i'))
wavplay(i,fs)
pause
s=Ac*(1+(m.*(input'))).*c;
plot(t,s)
wavplay((s'),fs)
pause
w=s.*c;
[num,den]=butter(9,0.025);
v=filter(num,den,w);
plot(t,v)
wavplay((v'),fs)
i want to record my voice using matlab and modulate it and demodulate using am mathematical procedures (imean not using modand demod commands)
and want to plot the every satge signal and play it.
this is my code
fc=1000;
fs=8000;
ts=1/fs;
Ac=4;
m=0.25;
t=0:ts:4.999875;
c=cos(2*pi*fc*t);
i=wavrecord(5*fs,fs);
plot(t,(i'))
wavplay(i,fs)
pause
s=Ac*(1+(m.*(input'))).*c;
plot(t,s)
wavplay((s'),fs)
pause
w=s.*c;
[num,den]=butter(9,0.025);
v=filter(num,den,w);
plot(t,v)
wavplay((v'),fs)