Error message when generating table from workspace variables
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Isabel Chen
am 31 Jan. 2015
Beantwortet: Isabel Chen
am 1 Feb. 2015
I tried to generate a table using the example provided in the documentation:
>> T = table(['M';'F';'M'],[45;32;34],...
{'NY';'CA';'MA'},logical([1;0;0]),...
'VariableNames',{'Gender' 'Age' 'State' 'Vote'})
Error using subsindex
Function 'subsindex' is not defined for values of class 'cell'.*
But got an error message! Please help!!
0 Kommentare
Akzeptierte Antwort
Image Analyst
am 31 Jan. 2015
Isabel:
I copied and pasted your code and it worked fine . You probably have an m-file called table.m , perhaps even the one that your code is in. That would be bad because it would conflict with the built-in table() function. What does this say
which -all table
Also, in your code, right before that line put this:
whos table
What does all that say in the command window?
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!