Home > atmlab > files > type_nc2ml.m

type_nc2ml

PURPOSE ^

convert netcdf3 type to matlab type

SYNOPSIS ^

function ml_type = type_nc2ml(nc_type)

DESCRIPTION ^

 convert netcdf3 type to matlab type

 According to http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/NetCDF_002d3-Variable-Types.html

 USAGE

   ml_type = type_nc2ml(nc_type)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

DOWNLOAD ^

type_nc2ml.m

SOURCE CODE ^

0001 function ml_type = type_nc2ml(nc_type)
0002 
0003 % convert netcdf3 type to matlab type
0004 %
0005 % According to http://www.unidata.ucar.edu/software/netcdf/docs/netcdf-c/NetCDF_002d3-Variable-Types.html
0006 %
0007 % USAGE
0008 %
0009 %   ml_type = type_nc2ml(nc_type)
0010 
0011 
0012 S.BYTE = 'int8';
0013 S.CHAR = 'char';
0014 S.SHORT = 'int16';
0015 S.INT = 'int32';
0016 S.FLOAT = 'single';
0017 S.DOUBLE = 'double';
0018 
0019 ml_type = S.(upper(nc_type));
0020 
0021 end

Generated on Mon 15-Sep-2014 13:31:28 by m2html © 2005