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

📄 countdlm.m

📁 细胞生长结构可视化工具箱-MATLAB Toolbox1999.zip
💻 M
字号:
% function count = countdlm(filename,dlm)
%
% Counts number of delimetrs on first line

function count = countdlm(filename,dlm)

eol = 10;

count=0;

file = fopen(filename);
if file ~= -1
	l = fgets(file);	% Obtain entire string of labels
	
	ie=1;			% end index of current string

	finished = 0;		% flag to detect when end of line is reached	
	while(finished == 0) 
	
		while (l(ie) ~= dlm) & (l(ie) ~= eol)	% find next delimeter
			ie = ie+1;
      end	
      if l(ie)==dlm
         count = count+1;
      end
      if l(ie)==eol
         finished = 1;
      end
      ie=ie+1;
   end
end

⌨️ 快捷键说明

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