0

experts ;) Working on the following problem. Have a state machine with the states A and B. State block 1 is called: A, info in the block: entry: A=1; State block 2 is called: B, info in the block: entry: A=0; Conditions for switching from A to B: Input(494)>494 & Input(631)<631 Condition for switching from B to A: Input(494)<494 & Input(631)>631 Input is a vector with 1000 values. The running time of the Simulink simulation is 1000 seconds. Scope only shows me 1 every time, but it should be 0 between 494 and 631.

Is anything wrong with the conditions??

check
  • 39
  • 5
  • The values of the input vector: 1,2,3, ...., 1000. – check Oct 05 '18 at 14:53
  • ok I thing the conditions are wrong, but how can I write that the output of the state flow schould be zero between the values 494 and 631 and 1 otherweise?? – check Oct 05 '18 at 15:01
  • Ok I tried a following: `[Input(494:631)]`. But I see the following error massage: `Illegal use of a matrix or vector type where a scalar was expected`. – check Oct 05 '18 at 15:20

0 Answers0