| MATLAB® | ![]() |
| On this page… |
|---|
Using the Find and Replace Utility Commenting Out a Block of Code |
The Workspace browser is a graphical interface to the variables stored in the MATLAB® base and function workspaces. You can view, modify, save, load, and create graphics from workspace data using the browser. Select View > Workspace to open the browser.
To view function workspaces, you need to be in debug mode.
For more information: See MATLAB Workspace in the MATLAB Desktop Tools and Development Environment documentation.
Find any word or phrase in a group of files using the Find and Replace utility. Click View > Current Directory, and then click the binoculars icon at the top of the Current Directory window.
When entering search text, you do not need to put quotes around a phrase. In fact, parts of words, like win for windows, will not be found if enclosed in quotes.
For more information: See Finding and Replacing Text in the Current File in the MATLAB Desktop Tools and Development Environment documentation.
To comment out a block of text or code within the MATLAB editor,
Holding the mouse over the highlighted text, select Text > Comment (or Uncomment, to do the reverse) from the toolbar. (You can also get these options by right-clicking the mouse.)
For more information: See Adding Comments in the MATLAB Desktop Tools and Development Environment documentation.
If there is part of your current MATLAB session that you would like to put into an M-file, this is easily done using the Command History window:
Use Shift+Click or Ctrl+Click to select the lines you want to use. MATLAB highlights the selected lines.
Right-click once, and select Create M-File from the menu that appears. MATLAB creates a new Editor window displaying the selected code.
If you use Emacs, you can download editing modes for editing M-files with GNU-Emacs or with early versions of Emacs from the MATLAB Central Web site:
http://www.mathworks.com/matlabcentral/
At this Web site, select File Exchange, and then Utilities > Emacs.
For more information: See General Preferences for the Editor/Debugger in the MATLAB Desktop Tools and Development Environment documentation.
![]() | Help | M-File Functions | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |