How do you store each row of text in a 7x1 array sequentially in a variable?
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
How do you store each row of text in a 7x1 array sequentially in a variable?
D =
7x1 cell array
a
b
c
d
e
f
g
--->
data1 = a
data2 = b
data3 = c
data4 = d
data5 = e
data6 = f
data7 = g
I want to declare the variables sequentially and store the elements of each row of the 'D' variable in them.
I was going to use a function called eval, but it's not recommended, so tell me another way.
4 comentarios
Stephen23
el 3 de Mzo. de 2022
"How do you store each row of text in a 7x1 array sequentially in a variable?"
I don't. Because MATLAB is designed to work efficiently with arrays. So I use arrays. You should use arrays too.
It is very unlikely that you need to do this, or that it would be a good way to achieve your data-processing goal.
But because you made this mistake:
we can't really help you much (in any case, the solution will be to use arrays, indexing, etc.).
Respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements 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!