Error Calling Generated SFunction - resulting in very slow model exectution
Ältere Kommentare anzeigen
I am attempting to run a simulink model on my laptop that currently runs with no issues on my desktop PC. I installed all the same versions of MATLAB, Simulink, and various toolboxes to replicate the software on both machines. The laptop has computing power virtually identical to the desktop, and neither computer shows signs of nearing an limits during model execution.
I transferred my main research model to my laptop to run, and it runs incredibly slowly (about 30 times slower than the real-time model should run). This model has a host of MATLAB Function Blocks in it. I get an error associated with each one of these blocks upon completion of model execution. The error states:
"Error calling generated SFunction, untitled_sfun. Undefined function untitled_sfun' for input arguments of type 'double'." Again, this error is repeated for every MATLAB Function Block in my model.
There is a file called untitled_sfun.mexw32 in the folder with my model. I presume that the s-function was built correctly the first time I ran the model on this computer. I have looked through all the settings or configuration parameters I can find to see what might be different between the two computers.
I don't recall ever facing this issue when I originally built the model on my desktop PC, but I can't imagine it to be something much more complicated that a simple setting difference. I did run mex -setup and selected the default compiler.
Any suggestions are much appreciated. Thanks.
Akzeptierte Antwort
Weitere Antworten (1)
Kaustubha Govind
am 22 Mai 2012
0 Stimmen
Is the name of your model untitled.mdl? Could you try deleting the untitled_sfun.mexw32 file, and try re-running your model? Also, is the desktop a 32-bit machine, and the laptop a 64-bit machine?
1 Kommentar
Mike Powell
am 23 Mai 2012
Kategorien
Mehr zu Simulink Coder finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!