Get error about table creating
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
J.FENG
el 6 de Abr. de 2023
Comentada: Stephen23
el 6 de Abr. de 2023
![code](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1347324/code.png)
I found a sample of creating table from others blog, it works in his matlab.
But when i copied the code to my matlab, i got error (Subscripting into a table using three or more subscripts (as in t(i,j,k)) is not supported. Always specify a row subscript and a variable subscript, as in t(rows,vars).)
0 comentarios
Respuesta aceptada
Stephen23
el 6 de Abr. de 2023
Editada: Stephen23
el 6 de Abr. de 2023
CAUSE: the bug is caused on this line, where you create a variable named TABLE:
table = table(..)
After you do that, then TABLE is a variable, and the next time you run the code MATLAB interprets () as indexing into that variable. Thus the error.
SOLUTION: Do NOT name your variable TABLE. Change the name to something else (not the name of a MATLAB function), e.g. "mytable", and CLEAR the TABLE variable from the workspace.
4 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Logical 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!