Equivalent to the make decision block in psim

reza hakimi_20486
reza hakimi_20486 Altair Community Member
edited July 2023 in Community Q&A

Hello
I wrote the program in simulink and used the make decision block in it, now how can I rewrite that block in psim to be able to generate code?

Tagged:

Answers

  • Albert_Dunford
    Albert_Dunford
    Altair Employee
    edited July 2023

    Hi Reza,

    i would recommend using the c block in psim and doing writing your logic in C. I have highlighted the main parts. When you define the number of inputs and outputs at the top you automatically get input and output variables created (xn,yn) respectively. You can rebuild the logic with "mux" elements if you are keen but it would be messy.

    image