%% Create NetCDF-4 File Using Classic Model
% Get the numeric values corresponding to the NETCDF4 and CLASSIC_MODEL constants defined by the NetCDF library. Use a bitwise-OR of the numeric values to specify more than one creation mode.

cmode = netcdf.getConstant('NETCDF4');
cmode = bitor(cmode,netcdf.getConstant('CLASSIC_MODEL'));

%
% Create a NetCDF-4 file that uses the classic model by specifying the creation mode value, cmode.

ncid = netcdf.create('myfile.nc',cmode);

%
% Close the file.

netcdf.close(ncid);

% Copyright 2015 The MathWorks, Inc.