Using Simulink | ![]() ![]() |
Comparing Performance
If you want to compare the performance of the Simulink Accelerator to Simulink in Normal mode, use tic
, toc
, and the sim
command. To run the F14 example, use this code (make sure you're in Normal mode).
tic,[t,x,y]=sim('f14',1000);toc elapsed_time = 14.1080
In Accelerator mode, this is the result.
elapsed_time = 6.5880
The results above were achieved on a Windows PC with a 233 MHz Pentium processor.
Note that for models with very short run times, the Normal mode simulation may be faster, since the Accelerator checks at the beginning of any run to see if it must regenerate the MEX-file. This adds a small overhead to the run-time.
![]() | Interacting with the Simulink Accelerator Programmatically | Customizing the Simulink Accelerator Build Process | ![]() |