MATLAB: Calculating the mean

mean

i used the code
out = [CLL_combinations(:,1:2,:) mean(CLL_combinations(:,3:end,:),2)]
i get output as
CLL_MEAN(:,:,1) =
83.0000 83.0000 0.6598
87.0000 87.0000 0.2103
;
;
;
CLL_MEAN(:,:,50) =
90.0000 90.0000 -0.1558
96.0000 96.0000 0.3872
now i want to find the mean of 3rd column of
CLL_MEAN(:,:,1) =
83.0000 83.0000 0.6598
87.0000 87.0000 0.2103
;
;
;
CLL_MEAN(:,:,50) =
90.0000 90.0000 -0.1558
96.0000 96.0000 0.3872
so finally i should get 50 means values,and output must be displayes aS
CLL_MEAN_NEW=
0.4099
;
;
0.1157
PLEASE HELP

Best Answer

CLL_MEAN_NEW = permute(mean(CLL_MEAN(:,end,:)),[3 2 1])
OR
CLL_MEAN_NEW = squeeze(mean(CLL_MEAN(:,end,:)))