ft_run_kat_simulation.m

来自「用matlab做的Frequency domain INterferomEter」· M 代码 · 共 62 行

M
62
字号
%---------------------------------------------------------------------  % function [Run] = FT_run_kat_simulation(FT, Run)% % Runs a Finesse simulation, as specified in a 'run' structure% and loads the ouput data into the given 'run' structure.%% run: structure defining the input file and is returned with the%      output data attached% FT: structure containing Finesse info%% Part of the SimTools package% Andreas Freise 22.05.08 afreise@googlemail.com%---------------------------------------------------------------------  function [Run] = FT_run_kat_simulation(FT, Run)  % base string for error message id  baseid='FT_run_kat_simulation';  if (~isstruct(FT))    msgid=[baseid,':checkinarg'];    msg='first input argument must be a "FT" structure';    error(msgid,msg);  end    if (~isstruct(Run))    msgid=[baseid,':checkinarg'];    msg='second input argument must be a "run" structure';    error(msgid,msg);  end  disp('--------------------------------------------------------------------');      % check for right number of outputs  msg = nargoutchk(0, 1, nargout);  if (msg)    msgid=[baseid,':checkoutputs'];    error(msgid,msg)  end  basename=FT_prepare_kat_filename(Run.filename);  [katfile,outfile,logfile,mfile,gnufile]=FT_set_kat_filenames(basename);    commandstring=[FT.katbinary,' --perl1 ',Run.options,' ',katfile];  disp(['Starting Finesse: ',commandstring]);  [status,result] = system(commandstring);    if (status)    msgid=[baseid,':FinesseError'];    error(msgid,result);  else    disp('     ... done!');  end    % if output is set: read data file  if (nargout==1)    Run=FT_read_kat_output_data(Run, outfile);  end        

⌨️ 快捷键说明

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