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.
  2 件のコメント
Hila Shacham
Hila Shacham 2019 年 9 月 23 日
Worked
Star Strider
Star Strider 2019 年 9 月 23 日
Great!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by