MATLAB question I have a wav file that consists of a nonidea
MATLAB question:
I have a wav file that consists of a non-ideal sinusiodal signal saved in the variable \"wave\" using [wave,fs] = audioread(\'filename\')
My carrier signal is a cosine cos(10000*2*pi*i)
I need to multiple my wave with the carrier signal like so: v2 = cos(10000*2*pi*i)*wave;
However if I do this or even this: v2 = cos(10000*2*pi*i).*wave;
I get an error of \"Inner matrix dimentions must agree\"
I must eventually AM modulate my wav file, so this is the first step in getting there. Is it possible to apply a carrier signal to the wav file. If so, what am I doing wrong?
Wav File 0.5 0.5 1.5 2.5Solution
here the duration of the wave file or, the voice signal is T=length(wave)./fs.
for your carrier wave take the time lapse is T
and time indices are
t=0:1/fs:T;
then the length of the \'wave\' vector and the carrier wave vector will be equal.
Now multiply both by writing
V2=wave.*V1
V1 is carrier signal .
then you get no error
