Desktop Tools and Development Environment |
Begin with Existing Code
Before you begin writing MATLAB code in a blank file, consider starting with existing resources for the code, and then use the MATLAB Editor/Debugger to modify the code. This section presents some resources to draw upon.
Create M-Files from Command Window and History
In many cases, you create and run MATLAB statements in the Command Window, modify those statements to your satisfaction, and then create an M-file that includes the statements. To facilitate this process, in the Command History, select the MATLAB statements you want to include in the M-file. Right-click and select Create M-File. The Editor/Debugger opens a new file that includes the statements you selected from the Command History. You can also copy the statements from the Command History and paste them into an existing M-file.
Editing and Debugging M-Files | Use Existing M-Files and Examples |
© 1994-2005 The MathWorks, Inc.