Simulink 不从 .mat 文件加载数据

use*_*427 0 simulation matlab simulink

我正在尝试使用“From file”块从 Simulink 中的 .mat 文件将数据加载到我的仿真模型中。我使用的是 Matlab 2012a。我的数据文件是尺寸为 1x200 的一维实数向量(双精度型)。

当我运行模拟时,出现以下错误: 模拟误差

在Matlab首选项中,我已经将设置“保存可以加载的MAT文件”设置为选项“Matlab版本7.3或更高版本”,但这不起作用。我也测试了这种方法但没有成功:http://www.mathworks.com/matlabcentral/answers/47422-simulink-does-not-support-loading-the-input-data-in-file
我将感谢任何想法。

Phi*_*ard 5

根据块帮助中的文档(通过按块对话框上的按钮From File获得):Help

Matrix format can be used only for vector, double, noncomplex  signals. Each
column of the matrix must have a time stamp in the first row and a vector
containing the corresponding data sample in the subsequent rows.
Run Code Online (Sandbox Code Playgroud)

您的 1x200 矢量与此格式不匹配。您需要添加代表时间的第一行。