Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Question with accessing field in a structure
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm new to MatLab so bear with me:
I have a structure named Recordings that has a field named Task, which can be either 'A', 'P', or some other value.
I want to create an index that tells me whether or not Recordings(x).Task is equal to A.
How would I go about this?
Thanks in advance.
0 Kommentare
Antworten (1)
dpb
am 23 Okt. 2015
isA=ismember([Recordings.Task].','A');
[] returns comma-separated list as array, .' transforms it to column vector...
Mayhaps there's a more direct way but I'm not all that adept w/ structures meself, yet...
0 Kommentare
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!