| 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… |
|---|
All methods support the attributes listed in the following table. Attributes enable you to modify the behavior of methods. For example, you can prevent access to a method from outside the class or enable the method to be invoked without a class instance.
Attribute values apply to all methods defined within the methods block that specifies the nondefault values.
methods (attribute1=value1,attribute2=value2,...) ... end
| Attribute Name | Class | Description |
|---|---|---|
| Abstract | logical Default=false | If true, the method has no implementation. The method has a syntax line that can include arguments, which subclasses use when implementing the method:
|
Access | enumeration Default = public | Determines what code can call this method:
|
Hidden | logical Default=false | When false, the method name shows in the list of methods displayed using the methods or methodsview commands. If set to true, the method name is not included in these listings. |
| Sealed | logical Default=false | If true, the method cannot be redefined in a subclass. Attempting to define a method with the same name in a subclass causes an error. |
Static | logical Default=false | Set to true to define a method that does not depend on an object of the class and does not require an object argument. You must use the class name to call the method: classname.methodname Static Methods provides more information. |
![]() | Class Methods | Ordinary Methods | ![]() |

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