How to assign a list of variables to an array efficiently

조회 수: 1 (최근 30일)
HC98
HC98 2021년 11월 23일
답변: Image Analyst 2021년 11월 23일
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