I cannot create a table using matlab's documentation example
2 views (last 30 days)
Show older comments
Hila Shacham
on 23 Sep 2019
Commented: Star Strider
on 23 Sep 2019
I am using Matlab version 2018b.
I am trying to create a table using Matlab's own example, for example:
sz = [4 3];
varTypes = {'double','datetime','string'};
T = table('Size',sz,'VariableTypes',varTypes)
I get the following error:
Subscripting a table using linear indexing (one subscript) or multidimensional indexing (three or more subscripts) is not supported. Use a row subscript and a
variable subscript.
0 Comments
Accepted Answer
Star Strider
on 23 Sep 2019
That runs for me without error.
Check to see if you have a variable called ‘table’:
which table -all
the only results should be:
C:\Program Files\MATLAB\R2019b\toolbox\matlab\datatypes\@table\table.m % table constructor
C:\Program Files\MATLAB\R2019b\toolbox\matlab\bigdata\@tall\table.m % Shadowed tall method
If the first entry is:
table is a variable.
you have found the problem. The solution is to re-name the variable.
More Answers (0)
See Also
Categories
Find more on Tables in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!