Frequency Modulation using Matlab
 From: "Nitin" <indianitin@xxxxxxxxx>
 Date: 16 Mar 2006 18:21:44 0800
HEllo All,
I am having one querry regarding MATLAB.
What I would be doing is that I will give the signal from a microphone
and I have to use MATLAB so that the signal gets frequency modulated
and then I will be taking the output from the headphone jack and mix it
with a carrier frequency [Local Oscillator] and send it to the spectrum
analyzer.I am doing a project named (Software Radio) where you have to
do the signal modulation using Software
So could some one help with the code I have written below
it is giving the error.
??? Error using ==> +
Matrix dimensions must agree..
Regards
Nitin
The Code is :
AI = analoginput('winsound');
addchannel(AI, 1);
Fs = 8000;% Sample Rate is 22050 Hz
set (AI, 'SampleRate', Fs)
d = 10; % 10 second acquisition
set(AI, 'SamplesPerTrigger', d*Fs);
start (AI);
data = getdata(AI);
n = Fs* d;
pause(5);
%plot (data);
%sound(data, Fs);
% set carrier characteristics
Fc = 1000; % carrier frequency (Hz)
c = (1:n) / Fs; % carrier data preparation
c = 2 * pi * Fc * c;
% set modulator
Fm = data; % modulator frequency (Hz)
mi = 0.5; % modulator index
m = (1:n) / Fs; % modulator data preparation
m = mi * cos(2 * pi * Fm * m); % sinusoidal modulation
% frequency modulation
s = sin(c + m); % frequency modulation
%sound presentation
sound(s, Fs); % sound presentation
%pause(d + 0.5); % wating for sound end
.
 FollowUps:
 Re: Frequency Modulation using Matlab
 From: A. Kumar
 Re: Frequency Modulation using Matlab
 Prev by Date: reqire matlab help
 Next by Date: Re: Data Range given mean and std deviation values
 Previous by thread: reqire matlab help
 Next by thread: Re: Frequency Modulation using Matlab
 Index(es):
Relevant Pages
