Ive been trying to dynamically modify the value of a field in a struct that can be any number of levels deep and was hoping to build a string that led to it, for example str = "x.y.z" and then use app.(str) to change its value. But it seems that matlab only lets you use strings to go into a maximum of 1 field deep, so app.(str) would work for str = "x" , but not for str = 'x.y.z'. Adding more periods to go deeper gives errors.
Because i cant know how deep any field will be, i cant break the string into its fields and use something like app.(str1).(str2).str(3), hence the need to have been able to build the string and call it at once with app.(longStr)