I have my own function which I want to use via scifunc_block_m block. The function is defined in an .sci file, as suggested in this answer. Running the script from the scilab console before starting the simulation works fine. However, if I call exec()
of this very .sci under xcos Simulation -> Set Context instead, the function seem to remain unknown in xcos. Am I missing something about the context setting?
It began with a function typed into scifunc_block_m or expression block. However,
- I didn't want to make the block big and was unable to use
..
to split the function definition over multiple lines to prevent the text spilling over the block boundaries. - The function will be used several times, I wanted a single definition vs copy&paste.