Accessing variable in struct using string
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Haziq Razali
am 7 Dez. 2018
Bearbeitet: Stephen23
am 7 Dez. 2018
Hello,
I am trying to access a variable within a struct named
behaviours{1,1}.pedestrian1
Is it possible to access this variable if I have a string named "pedestrian1" ? Basically something like this
ped = 'pedestrian1'
display(behaviours{1,1}.ped)
1 Kommentar
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Structures finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!