array of structures?

Is it possible to define and create an array of structures? This is relevant in the context of multithreading. For example, suppose I use CMLMT to maximize some sort of profile likelihood function. For each auxiliary index, I would like to save the cmlmtResults structure. After the threadFor loop, then I would like to compare all the  cmlmtResults structures.

1 Answer



0



Ok, I think I have figured it out:

struct cmlmtResults cmlout;
cmlout = reshape(cmlmtResultsCreate,n,1);

threadFor i(1,n,1);

struct cmlmtResults out;

....

cmlout[i,1]=out;

....

threadEndFor;

Your Answer

1 Answer

0

Ok, I think I have figured it out:

struct cmlmtResults cmlout;
cmlout = reshape(cmlmtResultsCreate,n,1);

threadFor i(1,n,1);

struct cmlmtResults out;

....

cmlout[i,1]=out;

....

threadEndFor;


You must login to post answers.

Have a Specific Question?

Get a real answer from a real person

Need Support?

Get help from our friendly experts.