MATLAB: Error Calling Generated SFunction – resulting in very slow model exectution

sfunctionsimulink

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.

Best Answer

It turns out that the wireless connection to both my home and work networks was the only thing causing this model to run slowly. When I disconnected from the wireless network, the model ran in real time. When I connected via CAT 5 cable to the LAN, it ran fine. Only when I had a wireless connection open did the model run very slowly. I can't explain it, but that's what was happening.