Using the Editor and Debugger with Classes

April 21st, 2010 Posted in Documents

Referring to

Define classes in just like scripts and functions. To use the or with a class file, use the full class name. For example, suppose the file for a class, myclass.m is in the following location:

1
+PackFld1/+PackFld2/@myclass/myclass.m

To open myclass.m in the editor, you could reference the file using dot-separated package names:

1
edit PackFld1.PackFld2.myclass

You could also use path notation:

1
edit +PackFld1/+PackFld2/@myclass/myclass

If myclass.m is not in an @-folder, then enter:

1
edit +PackFld1/+PackFld2/myclass

To refer to functions inside a package folder, use dot or path separators:

1
2
edit PackFld1.PackFld2.packFunction
edit +PackFld1/+PackFld2/packFunction

To refer to a function defined in its own file inside of a class @-folder, use:

1
edit +PackFld1/+PackFld2/@myclass/myMethod

For debugging, dbstop accepts any of the file specifications used by the command.

See for information about clearing class.

Leave a Reply

You must be logged in to post a comment.