MATLAB can generate C code for ARM Cortex-M

westfw:
What would be the advantage of using MATLAB over something like one of the standard C++ matrix libraries?

The advantages would be quite significant:

  1. Matlab code is compact, specially designed to work with matrices and vectors. You do not have to use "for loops" or learn how to utilize C libraries where a matrix multiplication is done by calling a function defined like this:
    "void simpleProduct(const real32_T a[5], const real32_T b[10], real32_T c[2])".
    In Matlab you just write c=a*b which looks like the ordinary mathematical language.

  2. In universities Matlab is much more utilized than C. So students are likely more familiar with Matlab than with C.

  3. With Matlab and Simulink is easy to test an algorithm that does signal processing or PID or other complicated things. You can simulate input data and display the output in a variety of ways using the numerous Matlab diagrams.

In general, the problem with using fancy libraries on microcontrollers is that they tend to pay very little attention to RAM consumption, which is one of the the most limited resources on most microcontrollers

  1. I am seeing that there is something called Embeded Coder (also a Matlab tool) which can generate efficient C code for various controllers and DSPs.
    see: http://www.mathworks.com/products/embedded-coder/description3.html

However, there could be traps. Only people who tried Matlab (Embedded) Coder could tell if this tool is really useful for generating good C programs for ARM Cortex-M microcontrollers.