フィルターのクリア

SimuLink: Implement Blocks with System Objects having multiple outputs.

2 ビュー (過去 30 日間)
Jens Henrik Göbbert
Jens Henrik Göbbert 2014 年 5 月 5 日
回答済み: Xianchao 2014 年 7 月 2 日
Hi,
I would like to use User-Defined System Objects in SimuLink ( http://www.mathworks.de/de/help/simulink/matlab-system-block.html ) having eleven outputs. But when I add the block to a SimuLink model and try to compile it, I get the error message
"[..]error occurred when invoking 'isOutputFixedSizeImpl' method of 'sf.csvSource'. Too many output arguments."
I implement the protected function isOutputFixedSizeImpl() like this:
function varargout = isOutputFixedSizeImpl(~)
varargout = cell(1, getNumOutputs(obj));
for i = getNumOutputs(obj)
varargout{i} = true;
end
end
Any idea what I am doing wrong?
best, Jens Henrik

回答 (1 件)

Xianchao
Xianchao 2014 年 7 月 2 日
Hey Jens Henrik,
Did you forget to add 'obj' as input argument? Try this:
function varargout = isOutputFixedSizeImpl(obj)
% Get outputs fixed size.
varargout = cell(1, getNumOutputs(obj));
for i = 1:getNumOutputs(obj)
varargout{i} = true;
end
end
Best, Xianchao

カテゴリ

Help Center および File ExchangeCreate Large-Scale Model Components についてさらに検索

製品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by