Output positive until value reach max then output negative in simulink

I have a problem that output a=c(c>0) when b<b_max where b = b + a. If b>b_max, output a=-c until b = b_min.
I wonder if there are some simple block diagram I can use in simulink. I tried with reset but couldn't figure out how to do this.
Many thanks,

Answers (0)

This question is closed.

Asked:

on 6 Dec 2014

Closed:

on 20 Aug 2021

Community Treasure Hunt

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

Start Hunting!