Borrar filtros
Borrar filtros

How to assign a list of variables to an array efficiently

2 visualizaciones (últimos 30 días)
HC98
HC98 el 23 de Nov. de 2021
Respondida: Image Analyst el 23 de Nov. de 2021
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?

Respuestas (1)

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

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by