回 帖 发 新 帖 刷新版面

主题:看看这是为什么?很难的

function dest_address = fcn()
eml.extrinsic('normrnd')
% This block supports the Embedded MATLAB subset.
% See the help menu for details. 
%dest_address = [-1,-1];
%this address is unifor distribute
%dest_address = fix(rand(1,2)*2);
%this address is norm distribute
dest_address = fix(normrnd(0.798,0.399,[1 2]));
怎么出现下面错误啊
Function output 'dest_address' cannot be of MATLAB type.

请高手解答

回复列表 (共1个回复)

沙发

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function dest_address = fcn()
eml.extrinsic('normrnd')
% This block supports the Embedded MATLAB subset.
% See the help menu for details. 
%dest_address = [-1,-1];
%this address is unifor distribute
%dest_address = fix(rand(1,2)*2);
%this address is norm distribute
dest_address = fix(normrnd(0.798,0.399,[1 2]));


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

该函数没问题,在matlab2007b下调用没问题。

我来回复

您尚未登录,请登录后再回复。点此登录或注册