- #1
ExpoEra
- 2
- 0
Hello all,
How do you a string in a variable as a name for another variable? Like this:
I have a variable called "Headings", inside it is a bunch of text [time, speed, distance].
Headings = [time, speed, distance]
Now, I want to have a variable that uses the text inside "Headings" as its name with 1,2,3,4 inside. So in effect, in the end I have:
time = [1,2,3,4]
So how do I make Matlab use the text inside the "Headings" as the name for a new variable?
I hope that made sense.:uhh:
Thanks.
How do you a string in a variable as a name for another variable? Like this:
I have a variable called "Headings", inside it is a bunch of text [time, speed, distance].
Headings = [time, speed, distance]
Now, I want to have a variable that uses the text inside "Headings" as its name with 1,2,3,4 inside. So in effect, in the end I have:
time = [1,2,3,4]
So how do I make Matlab use the text inside the "Headings" as the name for a new variable?
I hope that made sense.:uhh:
Thanks.