Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

matlab.mixin.SetGet class

Package: matlab.mixin

Provide handle classes with set and get methods

Description

classdef MySubClass < matlab.mixin.SetGet
    ...
end

The matlab.mixin.SetGet class is an abstract class that provides a property set and get interface to subclasses.

Use the matlab.mixin.SetGet class to derive classes that inherit set and get methods that behave like the MATLAB® graphics set and get functions.

The set and get methods inherited from matlab.mixin.SetGet support inexact property name matching. You can use a combination of partial and case-insensitive names as long as the inexact name is not ambiguous. Dot-based property references require exact property name matches. To implement exact name matching, use the matlab.mixin.SetGetExactNames class.

matlab.mixin.SetGet is a subclass of the handle class.

Methods

MethodPurpose
setAssigns values to the specified properties or returns a cell array of possible values for writable properties.
getReturns value of specified property or a struct with all property values.
setdispImplicitly called when set is called with no output arguments and a handle array, but no property name. Override this method to change what set displays.
getdispImplicitly called when get is called with no output arguments and handle array, but no property name. Override this method to change what get displays.

Attributes

Abstracttrue
ConstructOnLoadtrue
HandleCompatibletrue

For information on class attributes, see Class Attributes.

Introduced in R2014b

Was this topic helpful?