Dear all,
im trying to figure out how to write and read elements from a "struct" matrix in stata
Say that i have the following:
how do I write on the elements within "origen_destination"
The following options do not seem to work
Thank you
im trying to figure out how to write and read elements from a "struct" matrix in stata
Say that i have the following:
Code:
mata: mata struct coord { real scalar x real scalar y } origen = coord() destination = coord() origen.x=1 origen.y=1 destination.x=3 destination.y=3 origen_destination = coord(2) end
The following options do not seem to work
Code:
origen_destination[1,1]=origen origen_destination[1,2]=destination
Comment