view main/netcdf/inst/private/test_netcdf_unlim.m @ 12711:a4de85b2e6a0 octave-forge

fix bug 47014 and make test code work in matlab
author abarth93
date Fri, 19 Feb 2016 13:45:14 +0000
parents 5afb735e674c
children
line wrap: on
line source


import_netcdf

% 2 dimensions

fname = [tempname '-octave-netcdf.nc'];

ncid = netcdf.create(fname,'NC_CLOBBER');
dimid = netcdf.defDim(ncid,'time',0);
varidd = netcdf.defVar(ncid,'time','double',[dimid]);
netcdf.close(ncid)


ncid = netcdf.open(fname,'NC_NOWRITE');
varid = netcdf.inqVarID(ncid, 'time');
x = netcdf.getVar(ncid,varid);
netcdf.close(ncid)