setscicosvars

setscicosvars — set Scicos data structure while running

Parameters

name : a character string, the name of the required structure
v : vector of the new structure value

Description

This function may be used in a Scilab block to set value of some particular global data while running. It allows to write diagram supervisor blocks.

for example the instructions



x=getscicosvars('x');
xptr=getscicosvars('xptr');
x(xptr(k):xptr(k+1)-1)=xk
setscicosvars('x',x)
   
    

Changes the continuous state of the k block to xk.

See scicos_cpr for more detail on these data structures.

For C or fortran computational function the C procedure C2F(setscicosvars) may used. See routines/scicos/import.c file for more details.

Warning: The use of this function requires a deep knowledge on how scicosim works, it must be used very carefully. Unpredicted parameters, state, link values changes may produce erroneous simulations.

See also

getscicosvars, scicosim, curblock, scicos_cpr, getblocklabel