Desktop Tools and Development Environment |
Opening a Selection in an M-File
You can open a subfunction, function, file, variable, or Simulink model from within a file in the Editor/Debugger. Position the cursor in the name and then right-click and select Open Selection from the context menu. Based on what the selection is, the Editor/Debugger performs a different action.
Selection |
Action |
---|---|
Subfunction |
Cursor moves to the subfunction within the current M-file. If no subfunction by that name is found in the current M-file, the Editor/Debugger runs the open function on the selection, which opens the selection in the appropriate tool, as shown for the other selection types in this table. |
M-file or other text file |
Opens in the Editor/Debugger. |
Figure file (.fig ) |
Opens in a figure window. |
Variable |
Opens in the Array Editor. |
Model |
Opens in Simulink. |
Other |
If the selection is some other type, Open selection looks for a matching file in a private directory in the current directory and performs the appropriate action. |
After selecting a name, you can also choose Help on Selection from the context menu to see documentation for the item. For example, select a function, right-click and select Help on Selection. The reference page for that function opens in the Help browser, or if the reference page does not exist, the M-file help appears.
Incremental Search | Saving M-Files |
© 1994-2005 The MathWorks, Inc.