Thanks folks! I will give this a try. My backup plan is to export the data as an ASCII file, then use a text editor to find-and-replace all missing values with NaN, then just import that into MatLab.
And yes, of course it turns out I do have missing(). I must have misinterpreted the output I got when I used the command incorrectly.
Thanks again,
Sam Rabin Graduate student Princeton University Ecology & Evolutionary Biology
On Jun 20, 2011, at 8:16 PM, Ryo Furue wrote: Hi,
| > Hello! I am trying to analyze a NetCDF file in MatLab, and | > I would like to change all "missing" values in the dataset | > to NaN for compatibility. This would probably be trivial | > if the missing() [. . .] | Perhaps somebody can | tell us whether the NCO operators will let you do this.
It seems to me that you may be able to trick ncap2 into doing that. I say this because I don't see a legitimate way to generate a NaN in the ncap2 language. If ncap2 passes values to its math backend without checking, things like "sqrt(-1.0)" and "0.0/0.0" may generate NaNs. I haven't tested this idea.
Regards, Ryo
|