"table" error - "Unable to use a value of type 'cell' as an index"

8 vues (au cours des 30 derniers jours)
ImageProcNaive
ImageProcNaive le 1 Mai 2019
When I used the example shown in the function "table" on Matlab user website- it throws this error "Unable to use a value of type 'cell' as an index". Not sure why. Can anyone help?
  2 commentaires
Steven Lord
Steven Lord le 1 Mai 2019
Which of the seven examples on the table documentation page are you running?
Which release of MATLAB are you using? Does the example that you're trying to run from the online documentation exist in the locally installed documentation for the release you're using?
Can you copy and paste the exact code you run and the full text (everything displayed in red) of the error message into a comment on this question? The exact text may include details that will be of use in determining the cause of the problem.
Walter Roberson
Walter Roberson le 1 Mai 2019
Were you doing the Row Names example where they index the first dimension with a cell array of character vectors?
Which MATLAB version are you using?

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 1 Mai 2019
You accidentally created a variable named "table" so matlab thinks you are trying to index the variable.
  2 commentaires
ImageProcNaive
ImageProcNaive le 1 Mai 2019
Of course I did (<facepalm>)
Thanks a lot.
Eliana NessAiver
Eliana NessAiver le 17 Mai 2020
I've been looking and looking for a solution to my similar error message. I echo OP's facepalm. Thanks!

Connectez-vous pour commenter.

Plus de réponses (1)

ImageProcNaive
ImageProcNaive le 1 Mai 2019
Yes the first one. Please see the attached image. I am using 2018b table issue.PNG

Catégories

En savoir plus sur Matrix Indexing dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by