How to assign a list of variables to an array efficiently
3 ビュー (過去 30 日間)
古いコメントを表示
I have a list of variables:
a = 1;
b = 4;
c = 7;
d = 8;
e = 9;
And want to convert them into an array. It doesn't seem very efficient to use:
vars = [a; b; c; d; e];
Is there a more effective method?
0 件のコメント
回答 (1 件)
Image Analyst
2021 年 11 月 23 日
Not really. That way is fine. Why do you say it's inefficient?
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Multidimensional Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!