Fonction Scilab
eng - fr


scop_results_sim - charge, éxécute la simulation d'un script de simulation scilab et exporte les figures

Librairie

Séquence d'appel

i = scop_results_sim(sim_name)

Paramètres

Description

Add here a paragraph of the function description. Other paragraph can be added

Add here a paragraph of the function description

Exemple

Add here scilab instructions and comments

Contenu du fichier


//Fonction qui execute une un script de simulation
//scilab et exporte les fenetres graphiques résultantes
//dans des fichiers eps
//Entrée sim_name : path+nom du fichier script
function i=scop_results_sim(sim_name)
 //Switch to old_mode
 bak=get('figure_style');
 set("figure_style","old");

 //erase all graphics
 del_all_graphics()
 
 titlef=basename(sim_name);
 
 str='exec('''+sim_name+''',-1);';
 ierror=execstr(str,'errcatch');
 if ierror<>0 then 
     printf("\n******* Simulation problem *******\n")
 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

Fonction(s) utilisée(s)

Add here the used function name and references

Auteurs

enter here the author name Add here the author references