normalize(A,"range") function throwing error of "Too many input arguments." in Matlab 2023a.

I am using Matlab 2023a and trying to use normalize function as given in the document
A = 1:5;
Ns = normalize(A,"scale")
It gives me the following error.
Too many input arguments.

6 comentarios

Please run this command and show us the complete output:
which normalize -all
Q:\matlab-toolbox\geom2d\normalize.m
C:\Program Files\MATLAB\R2023a\toolbox\matlab\datafun\normalize.m % Shadowed
C:\Program Files\MATLAB\R2023a\toolbox\parallel\parallel\@distributed\normalize.m % distributed method
C:\Program Files\MATLAB\R2023a\toolbox\matlab\bigdata\@tall\normalize.m % tall method
Remove the GEOM2D toolbox from the search path.
Essentially you are not using the matlab built-in normalize function since you have geom2d toolbox with a normalize script overwriting the builtin one.
Thanks @Stephen23 and @Aquatris. The built-in normalize was confused with geom2d's normalize. I think its better to rename geom2d normalize.
Stephen23
Stephen23 el 27 de Feb. de 2024
Editada: Stephen23 el 28 de Feb. de 2024
" I think its better to rename geom2d normalize."
You will have to also check and possibly rename every NORMALIZE function call within that badly-written toolbox... and probably also the names of every other function that are defined by that toolbox.
Simpler to remove the badly-written toolbox from the search path.

Iniciar sesión para comentar.

Respuestas (1)

Move "Q:\matlab-toolbox\geom2d" with pathtool to the bottom and save. If it is in your startup file apply -end like this:
addpath Q:\matlab-toolbox\geom2d -end;

3 comentarios

That is risky:
  • GEOMED then calls the wrong NORMALIZE
  • one badly-named function hints that there might be more...
Asif Arain
Asif Arain el 27 de Feb. de 2024
Editada: Asif Arain el 27 de Feb. de 2024
Is there a way MATLAB thows a warning when more than one functions exist with the same name in the path directories?
"Is there a way MATLAB thows a warning when more than one functions exist with the same name in the path directories?"
No. Because this is completely normal and expected (e.g. overloaded functions).

Iniciar sesión para comentar.

Categorías

Más información sobre Startup and Shutdown en Centro de ayuda y File Exchange.

Productos

Versión

R2023a

Etiquetas

Preguntada:

el 26 de Feb. de 2024

Editada:

el 28 de Feb. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by