From: dalius on
Hello,

I'm currently doing research on audio signal processing project.I need someone help me to enframe the input signal coming from a microphone. At this moment, my problem only on that part. I already try to use some enframe.m function from voicebox. This is some code that i'm using.It is include windowing the signal:

fs = 11025;
n2 = 22050;
y2 = wavrecord(2*fs,fs);
%wavplay(y2,fs)
%subplot(2,1,1)
plot(y2);

%%%%%%%%%%%%ENFRAME%%%%%%%%%%%%%%%%%
figure;
%win = 'hanning';
%inc = 40;
len = 80;
f=enframe(y2,len);
%... process frames ...
plot(f);


%%%%%%%%%%%%%WINDOWING%%%%%%%%%%%%%%
%plot the hanning vector
windowHanning = window(@hann,n2).'; %create a hanning window vector
HanningWindowFigure = figure;
plot(windowHanning); %plot the hanning window
%xlabel('sample','FontWeight','bold')
%ylabel('amplitude','FontWeight','bold')
%title('Hanning Window','FontWeight','bold')
%grid
%set(hanningWindowFigure,'Position',[500,500,500,300])
%set(hanningWindowFigure,'Color',[0.97 0.97 0.97])
%ylim([0 1.2])


windowedSignal = windowHanning.*f; %multiply the inputsignal with this window
windowedSignalPlot = figure;
plot(windowedSignal);
%xlabel('time (seconds)','FontWeight','bold')
%ylabel('y(t)','FontWeight','bold')
%title('Windowed Sine Wave','FontWeight','bold')
%set(windowedSignalPlot,'Position',[500,500,500,300])
%set(windowedSignalPlot,'Color',[0.97 0.97 0.97])
%grid

When i run the codes, the error shows (??? Error using ==> times
Matrix dimensions must agree.)

If anyone know how to overcome this problem, please help me. This is my email [fikrulhakimothman(a)yahoo.com]