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

📄 ft_remove_comment_from_line.m

📁 用matlab做的Frequency domain INterferomEter Simulation SoftwarE,在国外网站下的,还在研究中,不会用,有会用的回复我
💻 M
字号:
%---------------------------------------------------------------------  % function [outstring] = FT_remove_comment_from_line(instring)% % Output the given string unchanged, unless its first character is% a '%' or '#', in which case an empty string is returned%% instring: string input% outstring: string output%% Part of the SimTools package% Andreas Freise 22.05.08 afreise@googlemail.com%---------------------------------------------------------------------  function [outstring] = FT_remove_comment_from_line(instring)  tmpstring=strtrim(instring);  posc1=strfind(tmpstring,'%');  posc2=strfind(tmpstring,'#');  if (any(posc1) | any(posc2))    if (posc1)      if (posc2)        if (min(posc1)>min(posc2))          endpos=min(posc2)-1;        else          endpos=min(posc1)-1;        end      else        endpos=min(posc1)-1;      end    else      endpos=min(posc2)-1;    end  else    endpos=length(tmpstring);  end  if (endpos==0)      outstring='';  else    outstring=strtrim(tmpstring(1:endpos));  end  

⌨️ 快捷键说明

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