Filter löschen
Filter löschen

different output for each condition

1 Ansicht (letzte 30 Tage)
Seungkyu Park
Seungkyu Park am 8 Jul. 2016
Beantwortet: Seungkyu Park am 8 Jul. 2016
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

Akzeptierte Antwort

Seungkyu Park
Seungkyu Park am 8 Jul. 2016
I was advised to use switch blocks to set the output. Thanks

Weitere Antworten (0)

Kategorien

Mehr zu Subsystems finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by