sortrows "not enough input arguments"
Mostra commenti meno recenti
Hello all,
Having difficulty using built-in function sortrows... I am attempting to sort a 2-column double array (var "x" below) by col 1 as follows:
x=sortrows(x,1);
Running this line of code returns the following error:
Error using matlab.internal.math.sortrowsParseInputs
Not enough input arguments.
Error in sortrows (line 60)
Notably, I have attempted running sortrows with matrices and other array types/sizes... all to no avail. Any help much appreciated.
5 Commenti
Stephen23
il 27 Mag 2023
In MATLAB R2021a matlab.internal.math.sortrowsHelper is called on lines 59 and 61. But not 60.
So you must have modified the function somehow, or be using another function. Please show the output of this command:
which sortrows -all
Michael Diaz
il 27 Mag 2023
Michael Diaz
il 27 Mag 2023
Stephen23
il 27 Mag 2023
"I am guessing I shadowed a built-in function somehow?"
Most likely.
"I have a copy of sortrows in my "Current Folder" that is different from the path pasted above"
That would be it.
"I am not sure if this might have anything to do with my current issue."
It is the cause of this issue.
Michael Diaz
il 27 Mag 2023
Risposte (1)
x = randi(99, 5, 2)
x=sortrows(x,1)
Seems to work fine. What did you do differently in the 59 prior lines of code?
1 Commento
Michael Diaz
il 27 Mag 2023
Categorie
Scopri di più su MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!