Additional information on how I want to expand this.
for ii = 1:length(x)
opMax = zeros(1:length(x), 1:5);
eval(['opMax(' num2str(ii) ') = max(x.d' num2str(ii) ');']);
end
Each 'x.d1' is a (1:n,1:5) array. I am trying to find the max in each column of 'x.d1' and return the five ans to the corresponding row of new array. This 'eval' and 'num2str' seems really messy and complicated, as I build up complexity I feel this will become less and less readable as code. The above test example does not work, incorrect array size allocation.