MATLAB: Using DSB-SC for a wav file.

dsbsc

Hello everyone..!!
I have a assignment to do for my lab which is about to remove the noise from a wav file. I did try the type that the teacher gave us but it doesnt seem to work. can anyone help me ?
clear all;
close all;
[data,fs] = audioread ('mixed.wav');
fc=13; %% hz
t=1:2; %% time
u=3*pi/2; %% phase
m = data * cos(2*pi*fc*t+u);
sound (m,fs);

Best Answer

If you intend to create a double sideband -suppressed carrier signal, you need to use element-wise multiplication:
m = data .* cos(2*pi*fc*t+u);
Of course the two vectors must have the same sizes, or the operation will throw an error to that effect.
See the documentation section on Array vs. Matrix Operations (link) for details.