store strings and numbers into an array
2 views (last 30 days)
i'am still a beginner in MATLAB and need your help.
if i have a list of Person names and their ages. e.g. Peter: 28; Fabian: 21; Mary: 32.
how to create an array in MATLAB including these informations and how to access them on the base of the name or age.
I appreciate every help.
Rik on 8 Jan 2022
I would suggest create a struct array:
[data.Age]=deal(28,21,32);%just to show a different syntax