MATLAB 报错 The S |
您所在的位置:网站首页 › matlab字段不存在怎么解决 › MATLAB 报错 The S |
S-Function函数报错
今天在调用S-Function函数时出现了报错:The S-Function sourse file cannot be found。It could be either that the file does not exist,or it’s not on your MATLAB path.Do you want to manually browseit,simply open the editor or cancel? 报错页面如下: 1.首先我在simulink调用S-Function函数之前,先在文件夹里面创建好.m函数文件,并且改好我需要的文件名。 2.然后在命令行里输入edit sfuntmpl,将sfuntmpl.m里的模板内容全部复制到我创建好的.m文件中。 3.在simulink中调用S-Function函数,双击打开设置,将S-function name这一项改为我刚刚创建的.m文件名,这样就把simulink中的S-function函数和.m文件关联起来了。问题解决。 以上方法仅供参考,如有不足,欢迎在评论区交流指正。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |