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

25 次查看(过去 30 天)
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.

采纳的回答

TAB
TAB 2012-5-23
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Sources 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by