getpos.m

来自「神经元信号处理软件」· M 代码 · 共 18 行

M
18
字号
function a = getpos(d,posType);% getpos - return the current position of the datastrm object (datastrm method)% a = getpos(d,posType) takes an datastrm object and the position type ('time','sweep','segment')
% return value is the current position of the datastrm object

if (strcmp(d.fileaccess,'ole'))
	error([mfilename ' not yet adapted for OLE-Object']);
end;

if (nargin == 1)
  posType = 'sweep';
end

if strcmp(posType,'sweep') | strcmp(posType,'segment')
  a = find(d.sweepStartPointer == ftell(d.fid));
else % posType == 'time'
  a = d.sweepStartTime(find(d.sweepStartPointer == ftell(d.fid)));
end

⌨️ 快捷键说明

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