I've looked at a few other questions but I couldn't come up with an answer, I'm relatively new to MatLab (but not programming) so I apologize if it's a duplicate.
I'm sure the title isn't very clear so here's an example:
I have an array, say name = ['Jack';'Jill'];. The elements in this array reference other arrays, such as:
Jack.income = 31000;
Jack.car = 1;
Jill.income = 55000;
Jill.car = 0;
Now, I would like to use name to pull data from the other arrays, such as:
data = name(1).income, which should return 31000, or data = name(2).car, which should return 0.
Any help on this would be greatly appreciated.
Thank you very much,
Eric