| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → MATLAB |
| Contents | Index |
| Learn more about MATLAB |
| On this page… |
|---|
Define classes in M-files just like scripts and functions. To use the editor or debugger with a class file, use the full class name. For example, suppose the file for a class, myclass.m is in the following location:
+PackFld1/+PackFld2/@myclass/myclass.m
To open myclass.m in the MATLAB editor, you could reference the file using dot-separated package names:
edit PackFld1.PackFld2.myclass
You could also use path notation:
edit +PackFld1/+PackFld2/@myclass/myclass
If myclass.m is not in an @-folder, then enter:
edit +PackFld1/+PackFld2/myclass
To refer to functions inside a package folder, use dot or path separators:
edit PackFld1.PackFld2.packFunction edit +PackFld1/+PackFld2/packFunction
To refer to a function defined in its own file inside of a class @-folder, use:
edit +PackFld1/+PackFld2/@myclass/myMethod
For debugging, dbstop accepts any of the file specifications used by the edit command.
See Modifying and Reloading Classes for information about clearing class.
![]() | Functions Used with Objects | Modifying and Reloading Classes | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |