input freqRange in bandpower doc example returning an error when it is a Mx2 matrix
Mostrar comentarios más antiguos
Hello,
While reading the doc of the function bandpower, I tried the example Percentage of Power in Frequency Bands (Periodogram) (in MATLAB online).
The line
powBands = bandpower(Pxx,F,[50 150;200 300],"psd");
returned the following error:
Error using bandpower
Expected input number 3, FREQRANGE, to be a vector.
Error in bandpower>psdbandpower (line 152)
validateattributes(freqrange,{'numeric'},{'vector','finite','real',...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in bandpower>timedomainbandpower (line 110)
pwr = psdbandpower(Pxx,F,freqrange);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error in bandpower (line 65)
pwr = timedomainbandpower(inputArgs{:});
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
which is quite incomprehensible, as the input description stipulate:
Frequency range for the band-power computation, specified as a two-element real-valued vector or as an M-by-2 real-valued matrix. M is the number of intervals along which to compute the band power.
Did I miss something ?
Best regards,
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
