我没用S函数,我要编写的控制器是模糊神经的一个算法,会用到好多matlab的函数,觉得用Matlab Fcn模块编写M函数比较容易些,是这样吧?
我又搜索了一些帖子,“如果有多个输入,用Mux组合成一个向量”,所以我把现场的4个变量存在了4个文件中,以列向量的形式都load进了workspace,但在用from workspace模块给仿真系统传递数据时候老有错误,提示:“Invalid matrix-format variable specified as workspace input in 'untitled/From Workspace'. The matrix must have two dimensions. Also, it must have at least 2 columns and must contain finite, double, and non-complex data. The first column must contain time values and the remaining columns the data values. Try using structure-format if your data has correct dimensions and time values but complex and/or non-scalar data values”,改不明白了。
这个参数怎么设置呢?我把这4个From Workspace参数设置里面的Data都设为了和workspace相对应的变量名,比如4个分别为:a,b,c,d,是这里不对吗?怎么改呢?