MMS Replace "NaN" values from spinfit mex code with NaN in Matlab, then ensure that NaN's are not written to CDF files but instead the corresponding FillVal for that variable is used.