MATLAB 帮助中心
类方法名称
methods ClassName
methods(obj)
methods(___,'-full')
m = methods(___)
methods ClassName 显示类 ClassName 的方法的名称。如果 ClassName 为 MATLAB® 或 Java® 类,则 methods 仅显示非隐藏的公共方法,包括从超类继承的方法。
ClassName
methods
示例
methods(obj) 显示 obj 的类的方法的名称。
obj
methods(___,'-full') 显示方法的完整说明,包括继承信息,对于 MATLAB 和 Java 方法,还包括方法特性和签名。此选项不会删除具有不同签名的重复方法名称。此选项不适用于在 MATLAB 7.6 之前定义的类。
'-full'
m = methods(___) 以字符向量元胞数组的形式返回方法名称。
m
全部折叠
显示 MException 类的公共方法
methods MException
Methods for class MException: MException addCause addCorrection eq getReport isequal ne rethrow throw throwAsCaller Static methods: last
构造一个 java.lang.String 对象,并显示该对象的公共方法的名称。
s = java.lang.String; methods(s);
Methods for class java.lang.String: String charAt chars codePointAt codePointBefore codePointCount codePoints compareTo compareToIgnoreCase concat contains contentEquals copyValueOf endsWith equals equalsIgnoreCase format getBytes getChars getClass hashCode indexOf intern isEmpty join lastIndexOf length matches notify notifyAll offsetByCodePoints regionMatches replace replaceAll replaceFirst split startsWith subSequence substring toCharArray toLowerCase toString toUpperCase trim valueOf wait
列出 MException 类的公共方法并显示方法签名。
methods('MException','-full')
Methods for class MException: MException lhs1 MException(asciiString rhs1, rhs2) MException scalar lhs1 addCause(MException scalar rhs1, MException scalar rhs2) varargout addCorrection(MException rhs1, Correction) logical lhs1 eq(rhs1, rhs2) logical lhs1 eq(MException rhs1, MException rhs2) logical scalar lhs1 eq(MException scalar rhs1, MException scalar rhs2) unicodeString lhs1 getReport(MException scalar rhs1, asciiString rhs2, rhs3) logical scalar lhs1 isequal(MException rhs1, MException rhs2) logical scalar lhs1 isequal(rhs1, rhs2) logical scalar lhs1 isequal(MException scalar rhs1, MException scalar rhs2) Static MException scalar lhs1 last(ustringToString scalar rhs1) logical scalar lhs1 ne(MException scalar rhs1, MException scalar rhs2) logical lhs1 ne(MException rhs1, MException rhs2) logical lhs1 ne(rhs1, rhs2) rethrow(MException scalar rhs1) throw(MException scalar rhs1) throwAsCaller(MException scalar rhs1)
将 MException 类的公共方法的名称存储在元胞数组中。使用 -full 选项包含方法签名。
m = methods('MException','-full');
类名,指定为字符向量或字符串标量。
数据类型: char | string
char
string
显示方法的完整说明,包括输入和输出参量
数据类型: char
方法名称,以字符向量元胞数组形式返回。
此函数不显示基于 Microsoft® .NET Framework 的类的泛型方法。使用产品文档获取有关泛型方法的信息。
methods 一词还是一个 MATLAB 类定义关键字。有关类定义关键字的详细信息,请参阅 classdef。
classdef
此函数将所有方法目录中的方法汇总在一起,并从列表中删除所有重复的方法名称。
全部展开
backgroundPool
ThreadPool
此函数完全支持基于线程的环境。有关详细信息,请参阅在基于线程的环境中运行 MATLAB 函数。
在 R2006a 之前推出
ismethod | methodsview | properties
ismethod
methodsview
properties
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处