matlab - How to equate a structure array to structure array -


the following code doesn't work, think it's clear want do:

my.struct = 1; foo.bar = my.struct; 

so that

foo.bar.struct = 1 

basically want fill in my structure array bunch of fields , values. want place struct nested struct within foo.bar while retaining field names.

my.struct = 1; foo.bar = my.struct; 

this places value of my.struct (=1) in foo.bar. of course foo.bar 1.

i think you're after this:

my.struct = 1 foo.bar = my; 

Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -