Mercurial > forge
annotate 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 |
rev | line source |
---|---|
12499 | 1 |
2 import_netcdf | |
3 | |
4 % 2 dimensions | |
5 | |
6 fname = [tempname '-octave-netcdf.nc']; | |
7 | |
8 ncid = netcdf.create(fname,'NC_CLOBBER'); | |
9 dimid = netcdf.defDim(ncid,'time',0); | |
10 varidd = netcdf.defVar(ncid,'time','double',[dimid]); | |
11 netcdf.close(ncid) | |
12 | |
13 | |
12711 | 14 ncid = netcdf.open(fname,'NC_NOWRITE'); |
15 varid = netcdf.inqVarID(ncid, 'time'); | |
16 x = netcdf.getVar(ncid,varid); | |
12499 | 17 netcdf.close(ncid) |
18 |