% Purpose % writes out a hyperslab of a variable to data file % % Synopsis % mexeps('putvar',varcode,var,var_shape) % mexeps('putvar',varcode,var,var_shape,var_range) % % Description % It writes out a hyperslab of a variable to netCDF data file. % The variable is refered be by variable code, varcode. The % input argument var is variable value; var_shape is the % variable shape; and var_range is optional. When var_range % is not specified, all variable values will be written out; % when var_range is specified, it is a 4x2 matrix with % [lower upper] limits of x, y, z, and t axis of the variable % you want to write. The type of variable written to the netCDF % file is float. % % Examples % Open a pointer file, then open a netCDF data file and write % variable to data file. % % mexeps('openw','pointer.file'); % open pointer file % mexeps('setnextw','datafile.cdf'); % open data file % % ... % writes out axis, attributes, etc. % % var_shape = [1 1 5 1]; % varcode = 20; % temp = [16; 15.8; 15.6; 15.4; 15.5]; % ax_range = [[1 1];[1 1];[2 4];[1 1]]; % mexeps('putvar',20,temp,ax_range); %writes out temp(2:4) % % See Also % setvar, putaxis, puttaxis %