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

6 次查看(过去 30 天)
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 个评论
Walter Roberson
Walter Roberson 2021-9-27
That error hints that myfunction might be an array rather than a handle to a function or a function.
Jan
Jan 2021-9-27
sortrows is a Matlab command.
Please post the complete error message. What does "when I tried to sort any table" explicitly mean?

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Tables 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by