MATLAB can generate C code for ARM Cortex-M

operations with matrices or perform signal processing, over a vector of data, are hard to implement directly in C.

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

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...