Using cell array to define double

1 回表示 (過去 30 日間)
Luigi
Luigi 2024 年 5 月 24 日
コメント済み: Stephen23 2024 年 5 月 24 日
Normally I create a 1x1 double as follows:
mydouble=1;
Now, say I create a cell array:
mycell = {'mydouble'}
I want to create the 1x1 double mydouble equal to 1 using the object mycell. How can I do that?
  2 件のコメント
Fangjun Jiang
Fangjun Jiang 2024 年 5 月 24 日
編集済み: Fangjun Jiang 2024 年 5 月 24 日
mydouble=1;
mycell = {mydouble}
mycell = 1x1 cell array
{[1]}

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

回答 (1 件)

Torsten
Torsten 2024 年 5 月 24 日
移動済み: Torsten 2024 年 5 月 24 日
mydouble = 1;
mycell{1} = mydouble
mycell = 1x1 cell array
{[1]}

カテゴリ

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

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by