MATLAB: How to average 1X5 cell

cellcell arrayMATLABmean

Hello everyone, I am starting fresh with matlab and hopefully you guys can help me. I have a 1X5 Cell and it contains different set of separation angles, How can i take mean values of First element and 3rd element of each cell?
[ 160.3;165.3; 134.72] [ 162.3; 155.3; 124.22;123.5] [ 160.6;160.3; 114.7] [ 170.3;165. 3;114.7;122.5;100.12] [ 160.3;145.3; 134.3;149.65]
So i have to get matrix that the first row return the average of 5 values indicated in bold and in the second row the average values of the 3rd elements indicated with Italics. Thank you for your help.

Best Answer

mean( cellfun( @(C) C(1), YourCell) )
mean( cellfun( @(C) C(3), YourCell) )
Related Question