Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

methods

Class method names

Syntax

methods('classname')
methods(...,'-full')
m = methods(...)

Description

methods('classname') displays the names of the methods for the class classname. If classname is a MATLAB® or Java® class, then methods displays only public methods, including those methods inherited from superclasses.

methods(...,'-full') displays a full description of the methods, including inheritance information and, for MATLAB and Java methods, method attributes and signatures. methods does not remove duplicate method names with different signatures. Do not use this option with classes defined before MATLAB 7.6.

m = methods(...) returns the method names in a cell array of strings.

methods is also a MATLAB class-definition keyword. See classdef for more information on class-definition keywords.

This function does not show generic methods from classes based on the Microsoft® .NET Framework. Use your product documentation to get information on generic methods.

Examples

Retrieve the names of the static methods in class MException:

methods('MException')
Methods for class MException:

addCause     getReport      ne           throw       
eq           isequal        rethrow      throwAsCaller

Static methods:

last     

Related Examples

Introduced before R2006a

Was this topic helpful?