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

📄 ft_prepare_kat_filename.m

📁 用matlab做的Frequency domain INterferomEter Simulation SoftwarE,在国外网站下的,还在研究中,不会用,有会用的回复我
💻 M
字号:
%---------------------------------------------------------------------  % function [basename]= FT_prepare_kat_filename(filename)% % Checks a given string whether it is suitable as a% Finesse input filename, it removes whitespace. It also % removes the extensions .kat or trailing dots and% returns a 'basename'.%% filename: string, filename before checking% basename: string, returned filename without extension%% Part of the SimTools package% Andreas Freise 22.05.08 afreise@googlemail.com%---------------------------------------------------------------------  function [basename]= FT_prepare_kat_filename(filename)  % base string for error message id  baseid='FT_prepare_kat_filename';  % check for right number of outputs  msg = nargoutchk(1, 1, nargout);  if (msg)    msgid=[baseid,':checkoutputs'];    error(msgid,msg)  end    if (~isstr(filename))    msgid=[baseid,':checkinarg'];    msg='input argument must be a filename';    error(msgid,msg);  end    % remove whitespace characters at begining and end  filename=strtrim(filename);  % check for '.kat'  nl=length(filename);  if (nl>4)    tmp=strcmp(filename(nl-3:nl),'.kat');    if (tmp) % found, now remove it      filename=filename(1:nl-4);    end  end  % check for trailing '.'  nl=length(filename);  if (filename(nl)=='.')    % found, now remove dot    nl=nl-1;  end  basename=filename(1:nl);  % check for whitespace characters inside filename  tmperror=max(isspace(basename));  if (tmperror)    msgid=[baseid,':checkname'];    error(msgid,'"%s" is not a valid filename', filename);  end    

⌨️ 快捷键说明

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