- #1
member 428835
Hi PF!
Given a matrix A = [1 2; nan 3; 3 4], how can I calculate the mean so that the resulting matrix averages the columns but ignores the nan values as non-entries, so that the mean of matrix A outputs [2,3]?
Thanks so much!
Given a matrix A = [1 2; nan 3; 3 4], how can I calculate the mean so that the resulting matrix averages the columns but ignores the nan values as non-entries, so that the mean of matrix A outputs [2,3]?
Thanks so much!