Assigning Value to Concatenated Variable

10 visualizaciones (últimos 30 días)
Andrew
Andrew el 1 de Jul. de 2011
Hello,
I am trying to use a simple for loop to create multiple variables. In the code below, I am trying to create variables tmp1, tmp2...tmp5 from the for loop.
for i = 1:5
['tmp' num2str(i)] = [];
end
However, I get an error stating that the left side of the equation cannot contain a character string. Any ideas on how to get around this would be greatly appreciated.
Thanks,
-Andrew

Respuestas (1)

Paulo Silva
Paulo Silva el 1 de Jul. de 2011

Categorías

Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by