Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

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.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top