Error while executing a MATLAB function block.

2 ビュー (過去 30 日間)
Prakash Ji barnawal
Prakash Ji barnawal 2020 年 9 月 26 日
コメント済み: Walter Roberson 2020 年 9 月 26 日
I tried to generate the switching signals via using the power signals with the help of MATLAB function block.
Aftre running the simulation i found the errors like below:
  1. Unable to locate a C-compiler required by Stateflow and MATLAB Function blocks. Use 'mex -setup' to select a supported C-compiler.

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 9 月 26 日
The first one on the list can only be used if you are using 32 bit Windows version of MATLAB.
The second one, SDK 7.1, can be difficult to install if you are using Windows 10.
The other ones are commercial (not free). You cannot use any of the Visual Studio "Express" or "Community" editions for a release that old: SDK 7.1 was the "Community" edition of those days.
Once you have installed a compiler (or chosen to use lcc), go to the MATLAB command line and command
mex -setup -v
and follow the prompts to register your compiler with MATLAB. If you run into problems, post the output of the mex -setup -v operation.
  2 件のコメント
Prakash Ji barnawal
Prakash Ji barnawal 2020 年 9 月 26 日
I'm using 64 bit windows
Walter Roberson
Walter Roberson 2020 年 9 月 26 日
For this purpose what is important is not whether your operating system is 64 bit, but rather whether you are running the 64 bit version of MATLAB. When you are running a 64 bit versions of Windows, you could run either the 32 bit or 64 bit version of MATLAB, at least up to R2015b.
Anyhow, if you are using the 64 bit version of MATLAB then your options are SDK 7.1, or one of the commercial compilers listed in the link above.
Installing SDK 7.1 on Windows 7 is not bad (though sometimes you needed to uninstall .NET and install SDK 7.1 and then reinstall .NET), but installing SDK 7.1 on Windows 10 can be a challenge.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeIntroduction to Installation and Licensing についてさらに検索

製品


リリース

R2013a

Community Treasure Hunt

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

Start Hunting!

Translated by