AKAIK: There are good support to read csv-files and write netCDF-files, but no tool to convert csv-files to netCDF. (There are contributions in the File Exchange, which promise to convert the other way round.) Thus, you need to make your own function:
- loop over all files, see How can I process a sequence of files?
- read a csv-file with textscan or csvread. textscan is somewhat faster.
- write to the netCDF-file, see netcdf, Summary of MATLAB Network Common Data Form (NetCDF) capabilities