Simulink 数据存储层次结构

Simulink Datastore hierarchy

我知道我可以访问模型中任何位置的顶层定义的变量。是否可以访问定义在较低级别的变量?

来自the documentation

You can define two types of data stores:

A local data store is accessible from anywhere in the model hierarchy that is at or below the level at which you define the data store, except from referenced models. You can define a local data store graphically in a model or by creating a model workspace signal object (Simulink.Signal).

A global data store is accessible from throughout the model hierarchy, including from referenced models. Define a global data stores only in the MATLAB® base workspace, using a signal object. The only type of data store that a referenced model can access is a global data store.