Strange error: "Unable to use a value of type table as an index."

3 visualizaciones (últimos 30 días)
Gabor
Gabor el 27 de Sept. de 2021
Comentada: Jan el 27 de Sept. de 2021
Hello,
When I used the word sortrows in the function input:
myfunc_results=myfunction(T, sortrows);
I get error: "Unable to use a value of type table as an index." when I tried to sort any table. in the function.
I change the word sortrows to sortrow and it works perfect.
It just may help someone...
Thanks
  2 comentarios
Walter Roberson
Walter Roberson el 27 de Sept. de 2021
That error hints that myfunction might be an array rather than a handle to a function or a function.
Jan
Jan el 27 de Sept. de 2021
sortrows is a Matlab command.
Please post the complete error message. What does "when I tried to sort any table" explicitly mean?

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Shifting and Sorting Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by