[Scilab-users] scicos_simulate error

Stéphane Bécu stephane.becu at maya-technologies.com
Tue Oct 16 14:40:41 CEST 2012


Hello
 
I'm using scilab 5.4 with Xcos module. Due to the bug 10434 ("clear" command erases scilab variables) on scilab 5.4.0, I'm using the current nightly build scilab-branch-5.4-1350142218 version. With this version, the "clear" issue has been fixed so that I can use Xcos variables but now the 'scicos_simulate()' function gives: 
!--error 21 
Index invalide.
at line      99 of function do_eval called by :  
at line     216 of function scicos_simulate called by :  
scicos_simulate(scs_m);

For information, I've checked that scicos_simulate.sci and do_eval.sci functions are the same for both scilab-5.4.0 and scilab-branch-5.4-1350142218 versions.
 
Please see the scilab example for using 'scicos_simulate()' function:
 
->importXcosDiagram("SCI/modules/xcos/demos/batch_simulation.xcos")
 ans  =
 
  T  
 
-->
 
-->typeof(scs_m) //The diagram data structure
 ans  =
 
 diagram   
 
-->
 
-->//This diagram uses 3 context variables : 
 
-->//  Amplitude : the sin function amplitude
 
-->//  Pulsation : the sin function pulsation
 
-->//  Tf        : the final simulation time
 
-->scs_m.props.context; //the embedded definition
 
-->
 
-->//first batch simulation with the parameters embedded in the diagram 
 
-->scicos_simulate(scs_m);
 !--error 21 
Index invalide.
at line      99 of function do_eval called by :  
at line     216 of function scicos_simulate called by :  
scicos_simulate(scs_m);
 
 
-->// Change the final time value
 
-->Context.Tf=10;
 
-->scicos_simulate(scs_m,Context);
 !--error 21 
Index invalide.
at line      99 of function do_eval called by :  
at line     216 of function scicos_simulate called by :  
scicos_simulate(scs_m,Context);
 
 
-->// without display
 
-->Context.Tf=10;
 
-->Context.Pulsation=9;
 
-->scicos_simulate(scs_m,list(),Context,'nw');
 !--error 21 
Index invalide.
at line      99 of function do_eval called by :  
at line     216 of function scicos_simulate called by :  
scicos_simulate(scs_m,list(),Context,'nw');
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20121016/01ee18b7/attachment.htm>


More information about the users mailing list