I thought this for loop might do it:
R = struct2cell(eulernew);
I = struct2cell(IDA);
Mat=struct();
for i=1:length(PX);
Mat.(['M' num2str(i)])=[R,I];
end
But this seems to concatenate the contents of each struct (eulernew,IDA) populates the fields Mat.M1,..,Mn with every array in eulernew and IDA. For example:
Mat.M1
ans =
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
[3x4 double] [1x4 double]
Close(ish), or maybe not? Could anyone modify this form to give the desired result?
Thomas