Archive for the ‘Documents’ Category:
Implementing a Set/Get Interface for Properties
The Standard Set/Get Interface
The MATLAB Handle Graphics system implements an interface based on set and get methods. These methods enable you to set or query the value of graphics object properties. The hgsetget subclass of the handle class provides implementations of these methods that your class can inherit to provide the same set and get functionality. Read More
Finding Handle Objects and Properties
Finding Handle Objects
The findobj method enables you to locate handle objects that meet certain conditions. Read More
Comparing Handle and Value Classes
Why Select Handle or Value
MATLAB support two kinds of classes — handle classes and value classes. The kind of class you use depends on the desired behavior of the class instances and what features you want to use. Read More
Tags: Arrays of Handle Objects, Behavior of MATLAB Built-In Classes, Classdef, Defining Events and Listeners — Syntax and Techniques, delete, Dynamic Properties — Adding Properties to an Instance, Functions, Graphics, Handle Class Delete Methods, Handle Class Methods, How to Initialize Property Values, Implementing a Set/Get Interface for Properties, matlab, Memory Allocation for Arrays, Passing Objects to Functions, The Handle Superclass, Which Kind of Class to Use
Specifying Class Precedence
InferiorClasses Attribute
You can specify the relative precedence of user-defined classes using the class InferiorClasses attribute. Assign a cell array of class names (represented as meta.class objects) to this attribute to specify classes that are inferior to the class you are defining. For example, the following classdef declares that myClass is dominant over class1 and class2. Read More
Tags: cell, char, Class Precedence and MATLAB Path, Classesdouble, Concatenating Objects of Different Classes, Determining Which Method Is Invoked, function_handle, Inferior, InferiorClasses, int16, int32, int64, int8, logical, matlab, single, struct, uint16, uint32, uint64, uint8, Working with Meta-Classes
Scoping Classes with Packages
Package Folders
Packages are special folders that can contain class folders, function and class definition files, and other packages. Packages define a scope (sometimes called a namespace) for the contents of the package folder. This means function and class names need to be unique only within the package. Using a package provides a means to organize classes and functions and to select names for these components that other packages can reuse. Read More
Matlab Defining Classes — Syntax
classdef Syntax
Class definitions are blocks of code that are delineated by the classdef keyword at the beginning and the end keyword at the end. Files can contain only one classes definition. Read More
Matlab Class Overview
MATLAB User-Defined Classes
A MATLAB class definition is a template whose purpose is to provide a description of all the elements that are common to all instances of the class. Class members are the properties, methods, and events that define the class. Read More
Tags: Attributes, Building on Other Classes, Class Attributes, Class Constructor Methods, classdef Syntax, classes, Comparing Handle and Value Classes, Creating Object Arrays, Event, Event Attributes, matlab, Method Attributes, Object Arrays, Property Attributes, Specifying Attributes, syntax, Working with Meta-Classes