⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mcnote.m

📁 一个研究声多普勒计程仪很好的工具箱
💻 M
字号:
function next_note_num = mcnote(cdfid, varid, text, note_num);
% mcnote.m annotates netCDF variables by using text attributes
%
% function next_note_num = mcnote(cdfid, varid, text, note_num);
%
% notes are of the form
%	NOTE_# ==> 'This is a note about this data'
%
% written by the command
% 	mexcdf('ATTPUT',cdfid,varid,['NOTE_',int2str(note_num)],...
% 	'CHAR',length(text),text);
%
% Where: 
%	cdfid = the handle of a netCDF file opened 
%		for writing   
%	varid = the variable id, can be NC_GLOBAL
%	text = the text of the annotation
%	note_num = the number of the note
%	new_note_num = the number to use for the next note
%
%  4/16/99 go back to mexcdf... it's faster!
%	3/19/99 update this to use netcdf rather than mexcdf MATLAB hooks

% we want feedback in case the user forgot to open the file
opts = mexcdf('SETOPTS','NC_VERBOSE');
%no netcdf equivalent

mexcdf('ATTPUT',cdfid,varid,['NOTE_',int2str(note_num)],...
	'CHAR',length(text),text);

% global attributes get handled differently
%if ~isempty(findstr(lower(varid), 'glo')),
%	eval(['cdfid.NOTE_',int2str(note_num),' = text;']);
%else
%	eval(['cdfid{varid}.NOTE_',int2str(note_num),' = text;']);
%end

% reset opts to the original state
%eval('SETOPTS',opts);
mexcdf('SETOPTS',opts);

next_note_num = note_num+1;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -