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

📄 readtokn.m

📁 该代码为图像融合的vc源程序,对学习图像融合有很重要的价值
💻 M
字号:
function token=readtokn(fileID)
%$Id: readtokn.m,v 1.1.1.1 2000/10/16 09:30:40 mattb Exp $
% token=readtokn(fileID)
%      Returns the next token from the file pointed to by fileID.
%      Tokens are separated by whitespace.
%      A comment starts with a '#' and ends at the end of a line, and
%      is treated like whitespace.
%      The token is returned as an array of characters.

finished=0;
while ~finished
  char=fscanf(fileID,'%c',1);
  % So, what does this char represent?
  if char=='#' % Skip to end of line
    dummy=fgetl(fileID);
  elseif ~isspace(char)
    finished=1;
    token=char;
    while ~isspace(char) & char~='#';
      char=fscanf(fileID,'%c',1);
      token=[token, char];
    end
  end
end

⌨️ 快捷键说明

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