MATLAB: Need a help on simulink block

gui simulink blocksimulink

hello, i want to create a code structure like below :
if(x == 1)
x=y;
z = a;
........
else
x = z;
y=a;
..........
which block i can use to generate such kind of code?

Best Answer

You can implement in many ways...
  1. Using If subsystem, If action subsystem & merge block.
  2. Using Switch block
  3. Using Enabled subsystems
Related Question