MATLAB normalize function shadowed by DSP toolbox normalize function

1 visualizzazione (ultimi 30 giorni)
Hi,
When I am trying to use in MATLAB R2019a,
normalize(X,'range');
The following error occurs,
Error using sum
Invalid option. Option must be 'all', 'double', 'native', 'default', 'omitnan', or 'includenan'.
Error in normalize (line 10)
It seems the matlab is using the normalize function in DSP toolbox. How can I use the MATLAB default normalize function?.
Thanking in advance for your help

Risposta accettata

Steven Lord
Steven Lord il 29 Ott 2019
Can you confirm that MATLAB is using the version from DSP System Toolbox and not the one from MATLAB or that you've created or downloaded? Run this command with the X on which you're trying to operate in the workspace:
which -all normalize(X, 'range')
I don't think the version of normalize in DSP System Toolbox even calls sum, and line 10 of the one included in MATLAB is a help text comment. I think you have a different normalize.m that's shadowing the one in MATLAB. Rename that normalize.m, remove it, or move it lower on the MATLAB path than the one in MATLAB.
  1 Commento
Kaveen Liyanage
Kaveen Liyanage il 29 Ott 2019
Hi, Thanks for the response,
Yes, following is the output.
C:\Users\******\******\PRML-PRMLT-v2.0.1-1-g314f475\PRML-PRMLT-314f475\common\normalize.m
C:\Program Files\MATLAB\R2019a\toolbox\matlab\datafun\normalize.m
I removed the first one from the path. Now works fine. Thanks

Accedi per commentare.

Più risposte (0)

Tag

Prodotti


Release

R2019a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by