Mercurial > forge
changeset 11797:e921fd6e2d64 octave-forge
initial import
author | abarth93 |
---|---|
date | Sat, 15 Jun 2013 12:53:35 +0000 |
parents | 472856b658d9 |
children | cc1f3c89df09 |
files | main/netcdf/src/private/format2mode.m |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main/netcdf/src/private/format2mode.m Sat Jun 15 12:53:35 2013 +0000 @@ -0,0 +1,18 @@ +function mode = format2mode(format) + +mode = netcdf_getConstant('NC_NOCLOBBER'); + +switch lower(format) + case 'classic' + % do nothing + case '64bit' + mode = bitor(mode,netcdf_getConstant('NC_64BIT_OFFSET')); + case 'netcdf4_classic' + mode = bitor(bitor(mode,netcdf_getConstant('NC_NETCDF4')),... + netcdf_getConstant('NC_CLASSIC_MODEL')); + + case 'netcdf4' + mode = bitor(mode,netcdf_getConstant('NC_NETCDF4')); + otherwise + error('netcdf:unkownFormat','unknown format %s',format); +end