从工作区输入数据到Simulink [英] Input data to Simulink from workspace
问题描述
你好,有人知道吗?我有来自matlab工作区的data(myData).在Matlab simulink中,我必须使用调节器来控制系统.首先,如何将数据(myData)放入simulink模型输入中,然后我想在图形中显示两个值(myData和Regulator).
您可以使用From Workspace
块从工作空间读取数据(比如说 simin ).
变量 simin 应该具有以下字段的结构:
-
信号:
-
values:表示数据的列向量.
-
描述:描述数据的字符串(可以为空)
-
-
time:时间戳,它是一列向量,其维数与信号字段的维相同(也可以为空)
用于将数据导入Simulink.要导出数据,可以使用Simulink库中的 To Workspace 块.
请注意,除非您在 To Workspace 的属性中指定为数组,否则输出也将是结构.
您可以在此处
谢谢
Hello anyone does know? I have data(myData) from matlab workspace. And in matlab simulink I have to do control system with regulator.First how to put data(myData) to simulink model input,and I want to show in graph two value(myData and regulator).
You can use the From Workspace
block to read the data( lets say simin ) from the worspace.
The variable simin should a structure with following fields:
signals :
values : A column vector representing data.
Description : A string describing the data (can be empty)
time : The time stamp, Its a column vector, with dimension same as that of the signals field ( can be empty as well)
That's for importing data into Simulink. For exporting the data, you can use the To Workspace block in the Simulink library.
Notice, that the output will also be a structure unless, you specify in the properties of the To Workspace to be an array.
You can refer to the documentation here
Thanks
这篇关于从工作区输入数据到Simulink的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!