📄 ft_run_kat_simulation.m
字号:
%--------------------------------------------------------------------- % 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -