# MATLAB Spoken Here

## Edit MATLAB Code for Simulink in the Editor

Since the long ago Ken days (circa 2009), the MATLAB Editor team and the Simulink Embedded MATLAB team have had an ongoing, under-the-covers project: integrating the Embedded MATLAB editor with the MATLAB Desktop Editor. In MATLAB R2011b and earlier, when you open a MATLAB Function block in Simulink, a separate editor UI opens up that looks similar, but not quite like, the regular MATLAB Editor. Starting in MATLAB R2012a, Embedded MATLAB (and other MATLAB-based function) blocks do their editing in the regular editor. All the same Editor features for stand-alone MATLAB files are now available, in one convenient place!

The 11b Embedded MATLAB Editor

The 12a MATLAB Editor with an Embedded MATLAB block

If you’re interested in Embedded MATLAB and other Simulink topics, be sure to subscribe to our Guy and Seth on Simulink blog.

### 2 Responses to “Edit MATLAB Code for Simulink in the Editor”

1. Thomas Marullo replied on :

Ah, this is a great change to the Matlab Function editor! Thanks.

2. Rick Rosson replied on :

+1

 Name (required) E-mail (required, will not be published) Website (optional) Spam protection (required): What is 4 + 9 ?

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>


If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).

News from the intersection of MATLAB, Community, and the web.

These postings are the author's and don't necessarily represent the opinions of MathWorks.