where is the error in my matlab code?

Status
Not open for further replies.

laham

Newbie level 6
Joined
Mar 30, 2006
Messages
11
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Activity points
1,357
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)
 

What type of modulation are you attempting?

"input" without any parameters is a syntax error in my MATLAB 7.3. What is it suppose to do?
 

it is AM modulation

and wat parameter for the input do you mean to be included?
 

Try to replace the variable "input", which is not defined with the recorded audio, which in your case is "i"
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…