How to assign a list of variables to an array efficiently
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (1)
Image Analyst
am 23 Nov. 2021
Not really. That way is fine. Why do you say it's inefficient?
0 Kommentare
Siehe auch
Kategorien
Mehr zu Whos finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!