MATLAB to C Made Easy – Previous Release R2015a

Get a Free Trial:
Get Pricing Info:
Ready to Buy:
For more on MATLAB Coder, visit:

In this webinar we demonstrate the workflow for generating readable and portable C code from your MATLAB algorithms using MATLAB Coder. Using the command line approach or the graphical project management tool, you can introduce implementation requirements to your algorithms written in MATLAB and generate readable source code, or a standalone compiled executable or a library that can be shared across your organization.

MathWorks engineers also explore how you can automatically generate MEX functions that can be used to verify the behavior of the generated code back in MATLAB or to accelerate computationally intensive portions of your MATLAB code by running it at compiled speed.

This webinar is geared towards design engineers developing and testing algorithms in MATLAB.


Elisabetta Ferrari says:

Nice video. I have a question: when it comes to define your input type, it seems that you need to specify the dimension based on your data. When it comes to using the MEX function in MATLAB, what happens if I need to input arrays of different length to the function? I have to feed in the mex function 4 inputs and 1 of them, depending from which trial I’m processing, will be of different length. When I run the code, I get the error saying that the dimension was not the one specified first. I’m sure I’m doing something wrong. Is there a solution or a way around this? Thank you very much!

sina jahadi says:

What a great Feature!
Thanks for your helpful video!

Jun Chen says:


Jonathan Blanchette says:

There is a typo at 26:30, it should have been iterations=sum(hstry~=0) instead of iterations=length(sum(hstry~=0)). However, you’ve made your point. Great Tute! Thanks.

Evgeny Murtola says:

0:45 Agenda summary
0:49 Why engineers translate MATLAB to C today
1:46 Algorithm Development Process
2:54 MATLAB code deployment methods
3:59 Challenges with manual translation from MATLAB to C
5:12 Automatic Translation of MATLAB to C
6:02 Simple demo: scalar inputs
8:44 Simple demo: matrix inputs
13:00 Three-Step workflow
14:18 Implementation considerations
17:25 Example: Newton/Raphson algorithm
19:15 Create simple testbench
19:40 Generate code
21:37 Check for runtime issues
27:20 Change the look and feel of the code
28:54 MATLAB features and function supported by MATLAB Coder
30:47 MATLAB coder use cases overview
31:29 Example: Code integration for zoom algorithm with an OpenCV parent project in Visual Studio
40:20 MATLAB code acceleration strategies
42:52 Example: Acceleration using different acceleration strategies
43:10 Using vectorization and memory preallocation
46:41 Using System Objects
48:15 Using C code generation (MEX)
49:00 Using MEX + parallel computing (toolbox)
50:22 When to expect acceleration due to MEX
51:25 Code generation for Simulink
51:40 Working with the embedded coder
53:22 ARM Cortex-M optimized code
54:00 ARM Cortex-A optimized code
54:24 Working with Simulink and embedded coder
55:54 MATLAB Coder vs. MATLAB Compiler + MATLAB Compiler SDK

Write a comment


Human Verification: In order to verify that you are a human and not a spam bot, please enter the answer into the following box below based on the instructions contained in the graphic.

Do you like our videos?
Do you want to see more like that?

Please click below to support us on Facebook!

Send this to a friend

▷ Other ReviewsVehicles▷ Show Cars▷ Motorbikes▷ Scooters▷ Bicycles▷ Rims & Tires▷ Luxury BoatsFashion▷ Sunglasses▷ Luxury Watches▷ Luxury Purses▷ Jeans Wear▷ High Heels▷ Kinis Swimwear▷ Perfumes▷ Jewellery▷ Cosmetics▷ Shaving Helpers▷ Fashion HatsFooding▷ Chef Club▷ Fooding Helpers▷ Coktails & LiquorsSports▷ Sport Shoes▷ Fitness & Detox▷ Golf Gear▷ Racquets▷ Hiking & Trek Gear▷ Diving Equipment▷ Ski Gear▷ Snowboards▷ Surf Boards▷ Rollers & SkatesEntertainment▷ DIY Guides▷ Zik Instruments▷ Published Books▷ Music Albums▷ Cine Movies▷ Trading Helpers▷ Make Money▷ Fishing Equipment▷ Paintball Supplies▷ Trading Card Games▷ Telescopes▷ Knives▷ VapesHigh Tech▷ Flat Screens▷ Tech Devices▷ Camera Lenses▷ Audio HiFi▷ Printers▷ USB Devices▷ PC Hardware▷ Network Gear▷ Cloud Servers▷ Software Helpers▷ Programmer Helpers▷ Mobile Apps▷ Hearing AidsHome▷ Home Furniture▷ Home Appliances▷ Tools Workshop▷ Beddings▷ Floor Layings▷ Barbecues▷ Aquarium Gear▷ Safe Boxes▷ Office Supplies▷ Security Locks▷ Cleaning ProductsKids▷ Baby Strollers▷ Child Car Seats▷ Remote ControlledTravel▷ Luggages & Bags▷ Airlines Seats▷ Hotel Rooms▷ Fun Trips▷ Cruise Ships▷ Mexico Tours