Why does the “goertzel” function not accept arguments in [N, N + 1) as the FFT index for signal inputs of length N in MATLAB R2024a and earlier?
Why does the "goertzel" function not accept arguments in [N, N + 1) as the FFT index for signal inputs of length N in MATLAB R2024a and earlier?
Specifically, I get a "Maximum Index exceeds the dimensions of X." error when running the following code:
>> Fs = 8000;
>> N = 205;
>> lo = sin(2*pi*697*(0:N-1)/Fs);
>> hi = sin(2*pi*1209*(0:N-1)/Fs);
>> data = lo + hi;
>> goertzel(data,205.5)
Error using goertzel (line 143)
Maximum Index exceeds the dimensions of X.
Error in goertzel (line 100)
Y1 = goertzel(reshape(X,coder.internal.indexInt(size(X,2)),ONE),INDVEC,1);Why does the "goertzel" function not accept arguments in [N, N + 1) as the FFT index for signal inputs of length N in MATLAB R2024a and earlier?
Specifically, I get a "Maximum Index exceeds the dimensions of X." error when running the following code:
>> Fs = 8000;
>> N = 205;
>> lo = sin(2*pi*697*(0:N-1)/Fs);
>> hi = sin(2*pi*1209*(0:N-1)/Fs);
>> data = lo + hi;
>> goertzel(data,205.5)
Error using goertzel (line 143)
Maximum Index exceeds the dimensions of X.
Error in goertzel (line 100)
Y1 = goertzel(reshape(X,coder.internal.indexInt(size(X,2)),ONE),INDVEC,1); Why does the "goertzel" function not accept arguments in [N, N + 1) as the FFT index for signal inputs of length N in MATLAB R2024a and earlier?
Specifically, I get a "Maximum Index exceeds the dimensions of X." error when running the following code:
>> Fs = 8000;
>> N = 205;
>> lo = sin(2*pi*697*(0:N-1)/Fs);
>> hi = sin(2*pi*1209*(0:N-1)/Fs);
>> data = lo + hi;
>> goertzel(data,205.5)
Error using goertzel (line 143)
Maximum Index exceeds the dimensions of X.
Error in goertzel (line 100)
Y1 = goertzel(reshape(X,coder.internal.indexInt(size(X,2)),ONE),INDVEC,1); goertzel, signalprocessing MATLAB Answers — New Questions