MATLAB: How to set the default value of an “Enabled Subsystem” or “If Else” block to a particular value

simulink

How to set the default value of an "Enabled Subsystem" or "If Else block" to a particular value?
By default the block outputs a 0 if the condition is not met (unless 'else') is specified. Can I change the default value to something else?

Best Answer

One way of setting the output value to a default number when the condition did not meet is to specify initial output values
 
  1. Open the dialog box for an Outport block within a conditional subsystem.
  2. From the Source of initial output value drop-down list, select Dialog.
  3. In the Initial output box, enter the initial value.
  4. Also set the Output when disabled option under the Output port to 'reset'.