I cannot create a table using matlab's documentation example

조회 수: 1 (최근 30일)
Hila Shacham
Hila Shacham 2019년 9월 23일
댓글: Star Strider 2019년 9월 23일
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