Embedded MATLAB Subset Automatically Generates Embeddable C Code

The MathWorks introduced the Embedded MATLAB(TM) subset of the industry-leading MATLAB® technical computing language. The Embedded MATLAB subset enables MATLAB users to generate highly efficient, embeddable C code directly from MATLAB programs, avoiding the common, time-consuming and error-prone process of rewriting MATLAB algorithms in C.

The Embedded MATLAB subset covers a broad range of MATLAB functionality with more than 270 MATLAB operators and functions and more than 90 Fixed-Point Toolbox functions. Embedded MATLAB supports many high-level MATLAB language features, such as multidimensional arrays, real and complex numbers, structures, flow control, and subscripting.

The conversion to C code is performed by Real-Time Workshop® 7, a MathWorks product widely used for embedded code generation. Real-Time Workshop automatically produces embedded C that is comparable to hand coding in size, performance, and memory use. A user can invoke Real-Time Workshop to work directly from a MATLAB M-file, or the file can be included by name in a Simulink® block diagram. If Simulink is used, synthesizable Verilog and VHDL can also be generated, using Simulink HDL coder. In either case, the generated code is numerically equivalent to the Embedded MATLAB source code.

Early users say the technology promotes rapid, accurate embedded software development. According to Matt Schurman, chief technology officer at GlucoLight Corporation, “By introducing the Embedded MATLAB language subset and Simulink in our design process, we virtually eliminated the errors previously experienced with manual code translation from MATLAB to C. At the same time we shortened the development of subsequent product generations – from design all the way to implementation.”

“MATLAB has always been many electronics engineers’ choice for algorithm development, and now Embedded MATLAB delivers what they want — to keep using MATLAB as they design and implement those algorithms in embedded systems,” said Ken Karnofsky, marketing director, signal processing and communications, The MathWorks.

Support for Embedded MATLAB technology is included in the latest release of these MathWorks products: MATLAB, Simulink, Fixed-Point Toolbox, Stateflow, SimEvents, and Simulink HDL Coder. Simulink and Real-Time Workshop are required products.

About The MathWorks
The MathWorks is the world’s leading developer of technical computing and Model-Based Design software for engineers and scientists in industry, government, and education. With an extensive product set based on MATLAB and Simulink, The MathWorks provides software and services to solve challenging problems and accelerate innovation in automotive, aerospace, communications, financial services, biotechnology, electronics, instrumentation, process, and other industries. The MathWorks was founded in 1984 and employs more than 1,800 people worldwide, with headquarters in Natick, Massachusetts.

MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, Embedded MATLAB, and PolySpace are trademarks of The MathWorks, Inc.