Why do I get the error 'Unable to use a value of type cell as an index.'?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
While creating an array2table, it shows an error 'Unable to use a value of type cell as an index.' How can I fix it? (don't pay attention on broken comment font).
0 comentarios
Respuestas (1)
Steven Lord
el 8 de Nov. de 2021
Is that table.m file that you have open in the Editor the one included with MATLAB, in which case you shouldn't have modified it? Or is it one that you've created yourself, in which case I recommend renaming it so it doesn't conflict with the table class included in MATLAB?
Regardless I'm guessing the presence of that table.m is the cause of this error.
3 comentarios
Steven Lord
el 9 de Nov. de 2021
Let's make sure you haven't accidentally shadowed the array2table function with either your own array2table.m or a variable named array2table. What does this command return?
which -all array2table
Ver también
Categorías
Más información sobre Tables 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!