Dear all,
I had a problem when I followed this tutorial:
I typed the following code in order to open dsm_demo.mdl:
open_system([docroot, '/toolbox/simulink/examples/dsm_demo'])
But when I tried to run the simulation, I got the following error message:
Please, Do you have any idea, how I can run this tutorial?
Thanks in advance!

 Accepted Answer

Sebastian Castro
Sebastian Castro on 24 Jun 2015
Since the MATLAB Function block (in releases earlier than R2015a) always generates C code, you need to install and configure a supported C compiler to do so.
What version of MATLAB are you using and on which operating system? For example, the list of Windows 32-bit supported compilers for R2012b is here:
You'll see there's a table for the Simulink product family, and the second column says "For model referencing, Accelerator mode, and MATLAB Function blocks".
After you have one of those installed, you can type mex -setup in MATLAB and it should guide you through setting that up.
- Sebastian

1 Comment

Simon Koszo
Simon Koszo on 25 Jun 2015
Edited: Simon Koszo on 25 Jun 2015
Thank you for your answer!
I have already found this link but I had problem with installing Windows SDK 7.1 for NETFramework 4 onWindows 7 (I have MatLab 2013a).
But for others who have the same problem: This link helped me:
Now everything works :)

Sign in to comment.

More Answers (0)

Categories

Products

Community Treasure Hunt

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

Start Hunting!