Temporary Data: Base Workspace
临时数据:基本工作区
Use the base workspace to temporarily store data:
使用基本工作区临时存储数据:
• While you learn to use Simulink
当你学习使用Simulink时
• When you need to quickly create variables while experimenting with modeling techniques
当您需要在试验建模技术时快速创建变量时
• When you do not need to store the data permanently
当您不需要永久存储数据时
To create variables in the base workspace, you can use the MATLAB command prompt or the Model Explorer. All open models can use the data that you create in the base workspace.
要在基本工作区中创建变量,您可以使用MATLAB命令提示符或模型资源管理器。所有打开的模型都可以使用您在基本工作区中创建的数据。
If you use variables to specify numeric block parameters in the model, you can programmatically change the parameter values during simulation by using commands at the command prompt. To programmatically change the values of parameters that you store in the model workspace or data dictionaries, you must use the function interfaces for those storage locations.
如果使用变量在模型中指定数值块参数,则可以通过在命令提示符下使用命令在模拟期间以编程方式更改参数值。若要以编程方式更改存储在模型工作区或数据字典中的参数值,必须使用这些存储位置的函数接口。
To permanently store base workspace data before you end a MATLAB session, you can save the data in a MAT-file or a script file. During a later session, you can load the