I cannot create a table using matlab's documentation example

1 vue (au cours des 30 derniers jours)
Hila Shacham
Hila Shacham le 23 Sep 2019
Commenté : Star Strider le 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.

Réponse acceptée

Star Strider
Star Strider le 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.

Plus de réponses (0)

Catégories

En savoir plus sur Tables 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