How to assign a list of variables to an array efficiently

1 次查看(过去 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?

回答(1 个)

Image Analyst
Image Analyst 2021-11-23
Not really. That way is fine. Why do you say it's inefficient?

类别

Help CenterFile Exchange 中查找有关 Whos 的更多信息

标签

产品


版本

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by