I cannot create a table using matlab's documentation example

1 次查看(过去 30 天)
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.

采纳的回答

Star Strider
Star Strider 2019-9-23
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Tables 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by