Matlab for C++ programmers


Today I went to Frankfurt to a seminar provided by MathWorks. It was about “Matlab for C++ programmers”. I learnt more about features that I didn’t know before like the Matlab engine. There’s more stuff that I’m going to tell you about later on but first some words about my trip.


When I came out of the train I rememberd my trip to a congress in Napoli two years ago. The train station in Frankfurt bear a resemblance to that one of Milano. Outside the first car I saw was an Italian. “Am I in Italy or in Frankfurt?” I asked myself. While I walked to the venue I took these pictures.



Back to topic. At the seminar we were shown how easy data can be plotted with Matlab probably generated by a C/C++ application. With some sample codes the Matlab language was introduced. The following code plots a unit circle.

t = linspace(0, 2*pi, 200);
x = sin(t);
y = cos(t);

There is more stuff in the Matlab tool chain that was new to me:

  • The Matlab Engine is used to call Matlab software from C/C++ and Fortran.
  • Embedded Matlab is a subset of the Matlab language. Efficient code can be generated for embedded implementation with Embedded Matlab.
  • PolySpace products verify C, C++, and Ada code for embedded applications by detecting run-time errors before code is compiled and executed. This advanced verification technology uses formal methods not only to detect errors, but to prove mathematically that certain classes of run-time errors do not exist.
  • With the Matlab Compiler you are able to generate a standalone application from your Matlab code. This application can be ported to other computers without Matlab installed on it. You just need the Matlab Compiler Runtime (MCR) to execute the Matlab instructions. If MCR comes with the application the end user doesn’t need anything else of the Matlab tool chain. There’s no obstacle anymore to share your Matlab algorithms.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>