How to initialize the memory block by external values (or tag)

23 views (last 30 days)
In my block diagram, there is one memory block. Function block parameters, initial value should be defined. I would like to decide initial condition source with external input. (In integral block it is easy to set.) But I cannot find the option how can I change initial condition source in memory block.

Accepted Answer

TAB
TAB on 23 May 2012
It is not possible to change the source of initial values for data store memory block. What you can do only is, instead of entering initial value directly in dialog box, you can you use simulink parameter to get the value from base workspace.
Initial values for Integrator block and Memory blocks have diffrent purpose.
It is possible to reset integrator block at any point of time during simulation. In this case its initial value act as output after reset. So it can be external input also.
Initial value of memory block means its output value at time t=0 when simulation is started and nothing is written on memory block. After that output of memory block will change depending on data written on it. Its initial value will never evaluated again at run time. So there is no meaning of providing initial value as external input.

More Answers (0)

Categories

Find more on Simulink Functions in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!