【问题标题】:Loading data to simulink (Invalid matrix-format)将数据加载到 simulink(无效的矩阵格式)
【发布时间】:2014-12-21 21:32:30
【问题描述】:

当我尝试从 Matlab 加载数据到 Simulink 时,我收到此错误:

 Error using TSFPnew (line 191)
    Invalid matrix-format variable specified as workspace input in 'modelTSFP/From Workspace5'. The matrix
    must have two dimensions and at least two columns. Complex signals of any data type and non-double
    real signals must be in structure format. The first column must contain time values and the remaining
    columns the data values.  Matrix values cannot be Inf or NaN.

我有一个非常简单的模型(我知道,在 Matlab 上做这个计算更容易,但这只是我模型的一部分):

所有数据都具有相同的尺寸 1x144:

为什么我不能直接将其加载到 Simulink 空间?

【问题讨论】:

    标签: matlab simulation simulink


    【解决方案1】:

    错误信息非常不言自明:From Workspace 块中的数据表示时间相关变量,因此如果您使用数组,则数组的第一列必须是时间值和第二(或更多)列对应的数据点。查看documentation 了解更多详情。您的数据似乎只是向量,您的值对应的时间数据在哪里?

    如果您想要一个参数(不随时间变化),那么不要使用 From Workspace 块,而是使用 Constant 块。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-09-13
      • 1970-01-01
      • 2015-05-25
      • 2016-05-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-24
      相关资源
      最近更新 更多