Installation guide

Running M-Files in the Editor/Debugger
General Display Options, select the check box for E n able datatips in
edit mode.
Using Configurations Running M-Files with Input
Arguments in the Editor/Debugger
In the Editor/Debugger, you can provide values for a function’s input
arguments using a configuration, and then run that configuration to use the
assigned values. When you are editing a function M-file, use a configuration
as an alternative to running the function in the Command Window. You can
associatemultipleconfigurationswith an M-file, for d ifferent inpu t valu e s.
MATLAB saves the configurations between sessions.
For example, the function
collatzplot_new.m, which computes and plots the
Collatz se que nce for any given positive integ er, requires you to s pe cify the
integer as an input value. Yo u cannot simply run
collatplot_new.m in the
Editor/Debugger b ecause the input v alue is not de fined. One way to specify
the input value is to run the M-file in the Command Window. Configurations
allow you to run
collatzplot_new(specific value) in the Editor/Debugger.
Yo u can also use configurations to provide preparatory o r setup information
prior to running an M -file, whether it takes input arguments or not.
Create and Run a Configuration for an M-file
Follow these steps to create a nd run a configuration for an M-file in the
Editor/Debugger. These steps specify Editor/Debugger toolbar buttons, but
you can also use equivalent items in the Debug menu.
1 Open the file y ou want to run in the Editor/Debugg er. For example, open
collatzplot_new.m by running
cd ([matlabroot '/help/techdoc/matlab_env/examples'])
edit collatzplot_new.m
To work with collatzplot_new.m on your system, save the file to a
directory for which you have write permission. In the exa mple, the file i s
saved to
I:\my_matlab_files\my_mfiles\collatzplot_new.m
6-67