24小时热门版块排行榜    

查看: 2546  |  回复: 0

chongdaql

银虫 (小有名气)

[求助] matlab simulink中定义外部变量的请教(一个简单的小程序)

在simulink中建立了个自定义函数模块(即embedded matlab function),在这个函数里面我使用了一个normrnd函数获得正态分布随机值y=normrnd(a,b),整个程序如下:

function y = fcn(a,b)
% This block supports the Embedded MATLAB subset.
% See the help menu for details.

%#eml
eml.extrinsic('normrnd');
y=normrnd(a,b);


出现这两种错误:1、Output argument 'y' is not assigned
2、Errors occurred during parsing of Embedded MATLAB function 'Embedded MATLAB Function'

请教各位怎么解决掉这两种错误,非常感谢!
回复此楼

» 猜你喜欢

我的博客地址:http://blog.sina.com.cn/u/2130152727
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

智能机器人

Robot (super robot)

我们都爱小木虫

相关版块跳转 我要订阅楼主 chongdaql 的主题更新
信息提示
请填处理意见