different output for each condition

How can I model below code segment with simulink blocks?
subsystem input: i1, i2, i3 subsystem output: o1
logic:
if i3 < i1 // less than i1
o1 = 1
else if i3 > i1 and i3 < i2 // b/w i1 and i2
o1 = 2
else // more than i2
o1 = 3
end
so many thanks

 Respuesta aceptada

Seungkyu Park
Seungkyu Park el 8 de Jul. de 2016

0 votos

I was advised to use switch blocks to set the output. Thanks

Más respuestas (0)

Categorías

Más información sobre Modeling en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 8 de Jul. de 2016

Respondida:

el 8 de Jul. de 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by