0

I want to define global variables in an xcos/scicos signal flow diagram. I tried the block Simulation>set context:

enter image description here enter image description here

But then it does not accept it as a known variable anywhere:

enter image description here

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!

Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193

1 Answers1

0

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.

Foad S. Farimani
  • 12,396
  • 15
  • 78
  • 193