You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
Warning: Function log has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.
3 views (last 30 days)
Show older comments
helow everyone! i am facing this kind of error while converting a MATLAB code into .NET. please help me. how can i fix this type of error
4 Comments
Stephen23
on 31 Aug 2020
"...but then it shows error in code."
If you want further help then show us the complete error message. This means all of the red text.
Answers (1)
Steven Lord
on 3 Sep 2020
You've written your own log.m file or downloaded a log.m from someone / somewhere else. The identifier log already has meaning in MATLAB. I recommend renaming your function.
15 Comments
Sameen Bilal
on 3 Sep 2020
my code file name is "skin.m" and i download it from Github... when i wants to convert it into c++ static library it shows warning.
Steven Lord
on 3 Sep 2020
The log.m that you can see in this directory in the Current Folder window is the problem. If you created that file, rename it and update your code that calls it to call the renamed file. If you downloaded it from Github I recommend renaming it, updating the code that calls it to call the renamed file, and informing the owner of the file on Github that they should do the same.
Steven Lord
on 3 Sep 2020
Taking a closer look, I'm 99% sure you will not be able to do what you want. I didn't notice before that you were trying to generate code from a GUI or app. None of the graphics or GUI / app functions support the C/C++ Code Generation extended capability. You can't generate code for the figure function, for example.
You may or may not be able to generate code for your algorithm but you can't for your graphical interface.
Steven Lord
on 3 Sep 2020
You're not going to be able to generate C or C++ code from the GUI with MATLAB Coder.
That log file suggests you don't have a license for MATLAB Compiler, which (depending on what you do inside your GUI) may be able to generate a standalone application for your GUI. [If you're doing symbolic calculations, for example, those are not supported for use with MATLAB Compiler.] Alternately you could have a license for MATLAB Compiler that is shared with others at your school or company but all the licenses are checked out.
Sameen Bilal
on 4 Sep 2020
i did'nt have any licence number.. from where can i get this license number.
besides this, convertion of the code is important for me. i want to attach this code with Visual Studio ..
Walter Roberson
on 4 Sep 2020
I see that you are using what appears to be a "Standard" / "Commercial" / "Professional" license (not a Home license or Academic license or Student license.) That is good, because not all licenses are eligible to use MATLAB Coder or MATLAB Compiler.
However, I see that you are using R2014a. It is no longer possible to buy licenses for R2014a, and you are too far out of date to be eligible to just pay retroactively. You will need to buy new versions of MATLAB and any toolboxes you need.
I do not know what current prices are, but I estimate that you should expect to pay over $US10,000 to get a current MATLAB together with MATLAB Coder toolbox. (Prices would be lower if you are eligible for educational pricing.)
Walter Roberson
on 4 Sep 2020
Note that there are several related but different products.
- There is the MATLAB Coder Toolbox, which is able to convert (some) MATLAB to C or C++ code that can then be compiled with an appropriate C or C++ compiler. With this option, MATLAB graphics cannot be used.
- There is the MATLAB Compiler Toolbox, which is able to convert (most) MATLAB to executables that can execute without a license. It would become an .exe, but you would not be able to debug it well. With this option, MATLAB graphics can be used.
- There is MATLAB Compiler SDK Toolbox, which is able to convert (most) MATLAB to libraries that can be called from Java or .NET. You would be able to call upon MATLAB from other programs, but you would not be able to debug it well. With this option, MATLAB graphics can be used.
- There are also interfaces to permit the MATLAB engine to be called through ActiveX / DCOM interfaces. This is built into MATLAB, without needing any extra toolbox. You would not be able to debug it well. With this option, MATLAB graphics can be used.
Walter Roberson
on 6 Sep 2020
There is no license number or activation key for any of the products I listed. You need a MATLAB license, and you purchase toolboxes for that license. Then you go into the installer and ask to install those products, and that process will also update your license file.
See Also
Categories
Find more on Get Started with MATLAB Compiler SDK in Help Center and File Exchange
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)