Hi! I'm trying to neatly display the means of a 3-D matrix, but can't get the results to print as a 2-D matrix.
test = rand(3,3,4)
for i = 1:3; for j = 1:3; grid = mean(test(i,j,:)) end end
When 'grid' prints it lists the nine means individually rather than placing them in a 3×3 matrix. Any suggestions?
Thanks!
Best Answer