i = scop_results(scs_m)
Add here a paragraph of the function description. Other paragraph can be added
Add here a paragraph of the function description
Add here scilab instructions and comments
//Fonction qui execute une liste scs_m //et exporte les fenetres graphiques résultantes //dans des fichiers eps function i=scop_results(scs_m) //Switch to old_mode bak=get('figure_style'); set("figure_style","old"); //erase all graphics del_all_graphics() titlef=scs_m.props("title")(1); context=scs_m.props("context"); execstr(context); //c'est dangereux cela scs_m.props.tf=Tfin; if fileinfo(tex_path+lang+'/'+titlef+'/sim_diagr.sce')<>[] then exec(tex_path+lang+'/'+titlef+'/sim_diagr.sce'); //attention else //ctxt=mlist('') ctxt=struct() //scs_m.props.context=[]; Info=list(); str='Info=scicos_simulate(scs_m,Info,ctxt)'; ierror=execstr(str,'errcatch'); if ierror<>0 then printf("\n******* Simulation problem *******\n") end end i=0 while %t win=xget("window"); if win==0 then xdel(win); win=xget("window"); if win==0 then xdel(win); break end else i=i+1; //xbasimp(win,titlef+'_scope_'+string(i)+'.ps') xbasimp(win,titlef+'_scope_'+string(i)) //unix_g(SCI+'/bin/BEpsf '+titlef+'_scope_'+string(i)+'.ps'+'.'+string(win)) unix_g(SCI+'/bin/BEpsf '+titlef+'_scope_'+string(i)+'.'+string(win)) xdel(win); end end //Retrieve figure_style gg=xget('window') // for bug in figure_style and winsid xset('window',0) // for bug in figure_style and winsid set('figure_style',bak) xset('window',gg) // for bug in figure_style and winsid endfunction