Matlab R2011a's new feature: portable C/C++ code directly from MATLAB

  • MATLAB
  • Thread starter Simfish
  • Start date
  • Tags
    Code Matlab
In summary, the new feature in Matlab R2011a allows for portable C/C++ code to be written directly from MATLAB. This means that C code can be written using MATLAB first and then run through MATLAB coder, making it easier to display output and debug. However, it seems that there may be some confusion about the availability of a DVD option for the student version, as the customer support is still being contacted.
  • #1
Simfish
Gold Member
823
2
Matlab R2011a's new feature: "portable C/C++ code directly from MATLAB"

Does anyone have more information about it? Does this mean that we could write most of our C code using MATLAB first, and then run the MATLAB coder? (C is important for speed, but MATLAB makes displaying output and debugging much easier)
 
Physics news on Phys.org
  • #2


I think so!

I haven't gotten to play with r2011a yet :(

(I ordered it yesterday, but I'm waiting to hear back from the MathWorks customer support as I ordered a DVD set and I think I got a download instead...anyone know if the student version doesn’t have a DVD option?)
 

1. What is the new feature in Matlab R2011a for portable C/C++ code?

The new feature in Matlab R2011a allows users to directly generate portable C/C++ code from their Matlab scripts or functions. This code can then be compiled and run on any platform that supports C/C++.

2. How does this feature benefit users?

This feature allows users to easily share their code with others who may not have access to Matlab. It also allows for faster execution of code, as C/C++ is a compiled language and generally runs faster than interpreted languages.

3. Can I convert all my Matlab code to portable C/C++?

No, not all Matlab code can be converted to portable C/C++. This feature only supports a subset of Matlab functions and syntax. Additionally, some features may not be fully supported and may require manual modification for successful conversion.

4. How do I generate portable C/C++ code from my Matlab script or function?

To generate portable C/C++ code, you will need to use the "codegen" function in Matlab. This function takes in your Matlab script or function as input and generates the corresponding C/C++ code. You can then compile and run this code on a C/C++ compiler.

5. Are there any limitations to using portable C/C++ code from Matlab?

Yes, there are some limitations to using portable C/C++ code from Matlab. For example, the generated code may not be as efficient as hand-written C/C++ code, and there may be compatibility issues with certain platforms or compilers. It is important to thoroughly test and debug the generated code before using it in production.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
7K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
5K
Back
Top