MATLAB Community

MATLAB, community & more

Results for: Editor

Edit MATLAB Code for Simulink in the Editor 2

Posted by Michael Katz,

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... read more >>

Update to Running files from the Editor 2

Posted by Michael Katz,

Another R2011b change was recently discussed in a MATLAB Answers question. This change is when you use the run button in the MATLAB editor, the name of the script/function will be displayed in the Command Window. Here is a visual example of that change: From a MATLAB interpreter/workspace view there is... read more >>

Variable and Function Rename 12

Posted by Michael Katz,

The MATLAB R2011b feature that I’ve been most anticipating is the automatic rename in the Editor. Renaming functions and variables is a common operation for programmers. It’s useful for making code easier to read and understand. For example, I often start hacking together a script by using easy-to-type names like... read more >>

R2011b Is Here! 12

Posted by Michael Katz,

It’s (almost) fall, and that means a brand-new release of MATLAB. Here are a few awesome new Desktop features in this release: Improved Command Window Formatting The Command Window has gotten some improved formatting. Error messages have a modern look with the function where the error occurred’s name in bold and linked... read more >>

The Go To Dialog 2

Posted by Michael Katz,

Over the weekend, reader “mnasr14” reminded me with a comment on an old post about the oft-overlooked Go To… dialog in the Editor. The Go To… dialog provides a quick way to jump to a point in an open Editor document by line number, function name, or cell title. This... read more >>

Highlighting Global and Persistent Variables

Posted by Michael Katz,

In R2010b we started highlighting non-local variables in light blue. Non-local variables are variables that are used in at least two functions that share scope. For example, a variable used both in a nested function and its parent function. We had a lot of feedback from users that when non-local... read more >>

Demo’ing Scripts With ECHODEMO 1

Posted by Michael Katz,

Scripting files in Cell Mode has plenty of benefits. In addition to code organization, rapid iteration, and publishing, cell mode can also be used to present cell-by-cell interactive demonstrations. Many of the demo files that come with MATLAB are written as cell mode scripts. This allows us to publish them into... read more >>

Controlling the MATLAB Path from the Editor 8

Posted by Christina Roberts,

Quiz: When setting a breakpoint in a file open in the Editor, your primary motivation is To stop at the corresponding line of code in the debugger. To change the MATLAB current folder. To add the file’s parent folder to the search path. To decorate your file with red ornaments for the holidays. If you... read more >>

Enumeration Templates

Posted by Michael Katz,

Ever since Class Objects were first introduced in R2008a, we’ve improved or added to their functionality. In R2010b, we have official support for Enumerations. Enumerations are type-safe collections of discrete, named values. Classic textbook examples are the days of the week (Monday, Tuesday, etc) and months (January, February, etc), because... read more >>