Error using ==> times Matrix dimensions must agree.
Show older comments
When I am executing this program, I got the error message
??? Error using ==>times Matrix dimensions must agree.
all i need to have is a signal that i will plot after multiplying the h vector and x input signal .
even with the same length , i couldn't find the problem
%generation de la reponse impultionnelle
h=[ zeros(1 ,480) -436 -829 -2797 -4208 -17968 -11215 46150 34480 -10427 9049 -1309 -6320 390 -8191 -1751 -6051 -3796 -4055 -3948 -2557 -3372 -1808 -2259 -1300 -1098 -618 -340 -61 323 419 745 716 946 880 1014 976 1033 1091 1053 1042 794 831 899 716 390 313 304 304 73 -119 -109 -176 -359 -407 -512 -580 -704 -618 -685 -791 -772 -820 -839 -724 zeros(1 , 480)]
figure, plot(h)
axis([ 0 1024 -30000 50000]);
xlabel('amp');
ylabel('pnt');
title('reponse impulsionnelle ');
set(gcf, 'Color', [1 1 1])
%creation du signal far-end
[x,fs]=wavread('Alarm01.wav');
t=linspace(0,length(x)/fs,length(x)); % creation du vecteur temps
plot(t,x)
figure, plot(h)
Nfft=1024; %longueur du vecteur frequence
f=linspace(0,fs,Nfft);
G=abs(fft(x,Nfft));
figure ; plot(f(1:Nfft/2),G(1:Nfft/2),'g')
y=h'.*G.
plot(y)
Accepted Answer
More Answers (0)
Categories
Find more on Resampling Techniques in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!