Automatic C code generation from MATLAB language

1 min read

MathWorks has unveiled a new product for generating portable C/C++ code directly from MATLAB.

The MATLAB Coder generates standalone, portable and readable C and C++ code from MATLAB algorithms, supporting a subset of core MATLAB language features. These include program control constructs, functions, and matrix operations. It can generate MEX functions that enable users to accelerate computationally intensive portions of MATLAB code and verify the behaviour of the generated code. "The Coder eliminates manual recoding from algorithm to implementation," said Mark Walker, pilot engineer at Mathworks. "This removes the need for software engineers to decode." MATLAB software is traditionally used for algorithm design such as signal and image processing, communications and other algorithm intensive applications. The algorithms are typically converted to C or C++ code for the next stage of development. "It has to eventually communicate with the outside world," said Walker. "This creates a need to translate the code as quickly and as efficiently as possible. With MATLAB Coder design engineers can design faster, test more systematically and maintain one design in MATLAB." The automatic code generation can be integrated with other software, enabling users to create compact, reusable libraries and incorporate MATLAB algorithms into a range of software environment. "Users can also prototype algorithms on pcs, accelerate the execution and implement on embedded processors," concluded Walker.