I want to define global variables in an xcos/scicos signal flow diagram. I tried the block Simulation>set context
:
But then it does not accept it as a known variable anywhere:
P.S. I tried the block diagram on a different computer and it now works with semicolons. Apparently this was a glitch or a bug!
OK, this is a bit strange but for some reason that semicolon at the end was the issue! So if you just omit the ;
and put variables line by line it all works out:
a = 2
b = 3
...
More elaborate tutorial on how/why using the set context
here.