フィルターのクリア

error using preallocation for table using size option in R2023b

1 回表示 (過去 30 日間)
vidyasagar g
vidyasagar g 2024 年 3 月 23 日
コメント済み: Dyuman Joshi 2024 年 3 月 24 日
h=table('Size',[ 2212 5],"VariableTypes",{'double','double','double','double','double'});
Error using table
You might have intended "VariableTypes" to specify a parameter name. However, the table constructor requires parameter names to be
specified as character vectors. Use table(..., VariableTypes=Value) or table(..., 'VariableTypes', Value) instead.

採用された回答

Dyuman Joshi
Dyuman Joshi 2024 年 3 月 23 日
編集済み: Dyuman Joshi 2024 年 3 月 23 日
Use single quotation marks around the VariableTypes arguement instead of double quotation marks -
% v v
h=table('Size',[2212 5],'VariableTypes',{'double','double','double','double','double'})
h = 2212x5 table
Var1 Var2 Var3 Var4 Var5 ____ ____ ____ ____ ____ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Reference - 2nd section of Description tab in the documentation of table - https://in.mathworks.com/help/matlab/ref/table.html#d126e1657554
  2 件のコメント
vidyasagar g
vidyasagar g 2024 年 3 月 24 日
Thnaks @Dyuman Joshi. It worked.
Dyuman Joshi
Dyuman Joshi 2024 年 3 月 24 日
You are welcome!

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by