Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler.
5 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Tu Tran
am 26 Mai 2018
Bearbeitet: Walter Roberson
am 13 Jun. 2018
I'm trying to use Matlab function. When I finish my simulation and click 'run' there is an error "Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler." I have no idea where is the 'mex-setup'. Could you fix that to me. Thanks in advance! Sorry with some mistakes in grammar. I'm not a native
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 26 Mai 2018
At the command line give the command
mex -v -setup
That will give you information about where it looked for compilers and what compilers it found on your system. You will likely find that you do not have one of the supported compilers installed.
You can look at https://www.mathworks.com/support/sysreq/previous_releases.html to see which compilers are supported for MATLAB and for Stateflow for your MATLAB release.
0 Kommentare
Weitere Antworten (4)
Tu Tran
am 3 Jun. 2018
1 Kommentar
Walter Roberson
am 3 Jun. 2018
Which MATLAB release are you using?
You should be able to use MATLAB provided that your release indicates it is available for Windows 7, and provided that you have SP1 or later
Tu Tran
am 3 Jun. 2018
1 Kommentar
Walter Roberson
am 3 Jun. 2018
You can use Windows SDK 7.1 for that version.
Tu Tran
am 8 Jun. 2018
8 Kommentare
Walter Roberson
am 8 Jun. 2018
It is not possible to just switch to discrete solver: you also need to discretize the model.
I am having some difficulties getting the powergui library block to interface properly -- but that is a number of steps further than you are getting.
There should be a number of lines of output before the message about DTC_sfun: please post those.
Also, please remind me which MATLAB version you are using.
Siehe auch
Kategorien
Mehr zu Manual Performance Optimization finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
