MATLAB: How to model in which an integrator block discharges its initial value from a non zero time in Simulink 7.6 (R2010)

simulink

I have an integrator block in my model. I would like to model the output of the integrator blocksuch that its initial value (non zero) would decay to zero starting at a non zero time.
For example: I want to initialize the integrator to 100 and the value from the integrator block should decrease to 0 staring from time t = 1.

Best Answer

You can implement the desired output based application as illustrated in the attached model using 3 methods. Find the model 'example.mdl' attached to this solution.
In each of the methods the implementation is unique:
Method 1: Uses IF ELSE action subsystem
Method 2: Uses LEVEL setting for the integrator block. In this method the choosing 'level' in the external reset option, holds the value of of the initial state to 100 until the falling edge of the step input. For more information about this setting, refer to the link below:
<http://www.mathworks.com/access/helpdesk/help/toolbox/simulink/slref/integrator.html>
Method 3: Uses an enabled subsystem