MATLAB Answers

Jim Clay

Prevent Matlab Coder from making temp arrays into global arrays

Asked by Jim Clay
on 19 Nov 2012

I am using Embedded Coder to turn Simulink models into C. It appears, though, that Embedded Coder uses Matlab Coder on the Matlab Function blocks. This would be fine, except Matlab Coder makes temporary arrays (e.g. arrays inside of sub-functions) into globals. Is there any way to prevent this?

  1 Comment

Can you please post some MATLAB code where you see this behaviour?

0 Answers

Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!