Search code examples
simulationmatlabsimulinkmatlab-guide

how to select single input from multiple output in Simulink?


Could any one tell me how can i use a Multiport switch in the following example. i can use alternatively MATLAB funtion block with M script but its slow. 2 days before i try to use a sum block as shown in figure2 and i thought i am genius and and i was succed. But Today Morning i am getting a 'Ghombaro Result'(Unexpeted Result)' i.e during simulation mode when i am changing my input level the pervious output is remain same and its adding up i thought it will replace it with ZERO ... :( ..... is there any way to do it by using another block or with any idea... enter image description here

enter image description here.

Thank you...............


Solution

  • Use a Merge block, to merge all input from your 'If Action Subsystems', set Initial Output as 0. Connect the output of merge block to the 'Display' block

    enter image description here