Azzera filtri
Azzera filtri

Accessing variable in struct using string

9 visualizzazioni (ultimi 30 giorni)
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)

Risposta accettata

Adam
Adam il 7 Dic 2018
Modificato: Adam il 7 Dic 2018
behaviours{1,1}.( ped )
should work

Più risposte (0)

Categorie

Scopri di più su Structures in Help Center e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by