With R2010b and SNCTOOLS, you can read and write netCDF-3 and netCDF-4 files in the classic model. You can also read enhanced-model files, but you should use MATLAB's native interface to create enhanced-model content if that is your wish.
First download SNCTOOLS (current as of svn commit # 4053) and check the README. Please note that your browser may unzip the download for you, so you need to be aware of that. The instructions below assume that it is not unzipped.
If have R2012a, you are also set to go with OPeNDAP, but if your version of MATLAB is earlier than that, you should also download version 4.2 of netcdf-java from Unidata. If you have downloaded both into the same directory, you can then finish the install in matlab by changing into that directory and
javaaddpath([pwd '/netcdfAll-4.2.jar']); javaaddpath ([pwd '/mexcdf/snctools/classes']); unzip('mexcdf.r4053.zip') addpath ([pwd '/mexcdf/mexnc']); addpath ([pwd '/mexcdf/snctools']);
You can test out your installation with
test_snctools()Please let me know if this does not work for you.