MATLAB: Calculating the mean of a non-continuous data set

beginnercontinuous dataMATLABmeansummary statistics

Hi all,
I am a total beginner with MatLab and I am trying to caclulate the means of a (223×20) array, however the majority of columns do not have a continous data set i.e only have 60 out of 223 data entries.
As a result i am seeing NaN for the majority of my means when using the basic mean(A) function.
Would really appreciate any help!

Best Answer

mean_val = nanmean(your_variable)