title: first non NaN element value and index in matlab
body: <p>I want to obtain value and index of first non-NaN element from each column of a matrix in the matlab. </p>
  
  <p>In a separate problem--- There are few columns that does not have NaN. So in that case-- I would like to extract value and index of first non-NaN element from each column and otherwise first element of each column if column does not contain NaN. </p>
  
  <p>Can anybody help regarding these two problems? </p>