Store a double value into the cell array element
6 ビュー (過去 30 日間)
古いコメントを表示
I have a cell array, e.g
name={'A','B','C'};
I would like to extract the name elements and use them as variables, we know that,
name{1}=A
I want to assign 'A' a double value or vector;
name{1}=[1 2 3]; % this one is definitely wrong, it is just for example
then when i call A from the command-window, it should show [1 2 3]; is it possible to do that?
appreciate ur help
0 件のコメント
採用された回答
Geoff
2012 年 4 月 6 日
You'd need to use eval, but there's almost always a good reason not to do what you're trying to do.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Tables についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!