Sorry but this is a really simple question. I have a struct (3 fields and 446 elements) and I'm trying to access a a specific field and assign it to a workspace variable. I used the following syntax:
new_var = structname.fieldname
However, when I do this, I just get the first row of data in my field name. I want all the rows in structname.fieldname to be assigned to new_var.
When I try structname(1).fieldname or structname(2).fieldname - i get the corresponding row data only. I've tried the following: structname.fieldname(:,1) but get the following error message:
Expected one output from a curly brace or dot indexing expression, but there were 446 results.
Also tried structname(:).fieldname but again, just get the first row of data in fieldname - I'd like all 446 elements.
I know this is very simple but I just can't figure it out!