WL = 40; % window length
mez2= 10; % threshold
Fvz = 20;nastdelka = length(data);figure(2);plot(time,data);xlabel('time [s]');ylabel('Amplituda');title('Pitch'); for n = 1:(nastdelka*Fvz-2*WL-1) okno1=data(n:n+WL-1); okno2=data(n+WL+1:n+1+2*WL-1); m = linspace(0,WL-1, WL); for k = 1:WL/2 Y1(k) = sum(okno1.*(exp(-2*pi*1i*k*m/WL))); <-- ERROR: Error using .* Matrix dimensions must agree. Y2(k) = sum(okno2.*(exp(-2*pi*1i*k*m/WL))); end Y1=abs(Y1); Y2=abs(Y2); G2(n) = max (0.5*(Y1./Y2+Y2./Y1)-1); end
MATLAB: Error using .* Matrix dimensions must agree.
matrix dimension
Best Answer