필터 지우기
필터 지우기

Why do I get a build error when generating a code for model containing stateflow in MATLAB 2011b "error calling s generated S function" ?

조회 수: 4 (최근 30일)
Why do I get a build error when generating a code for model containing stateflow "error calling s generated S function" ?
Model simulates properly, when build system to generate code is selected the following error is got in MATLAB 2011b. The model has a stateflow and I'm taking a guess its because of this.
Error recieved is : Error calling generated Sfunction, model_sfun. Undefined function 'model_sfun' for input arguments of type 'double'

답변 (1개)

Gerhard Feichtinger
Gerhard Feichtinger 2015년 7월 8일
I just had the same error in 2015a, and it seems to be because I was setting the Simulink CodeGenFolder and CacheFolder parameters to nonstandard values. I'm not sure if there's a similar StateFlow value to set, but commenting out these lines from my setup file fixed the issue. So maybe it's something that you set up for Simulink that Stateflow is expecting in a different location?
% Simulink.fileGenControl('set', 'CacheFolder', [userpath '/_code_dummy_'], 'createDir', true)
% Simulink.fileGenControl('set', 'CodeGenFolder', [userpath '/_code_dummy_'], 'createDir', true)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by