Changing the Rules ... in Appearance Only

Access Full Text

Changing the Rules ... in Appearance Only

For access to this article, please select a purchase option:

Buy chapter PDF
£10.00
(plus tax if applicable)
Buy Knowledge Pack
10 chapters for £75.00
(plus taxes if applicable)

IET members benefit from discounts to all IET publications and free access to E&T Magazine. If you are an IET member, log in to your account and the discounts will automatically be applied.

Learn more about IET membership 

Recommend Title Publication to library

You must fill out fields marked with: *

Librarian details
Name:*
Email:*
Your details
Name:*
Email:*
Department:*
Why are you recommending this title?
Select reason:
 
 
 
 
 
A Guide to MATLAB® Object-Oriented Programming — Recommend this title to your library

Thank you

Your recommendation has been sent to your librarian.

Author(s): Andy H. Register
Source: A Guide to MATLAB® Object-Oriented Programming,2007
Publication date January 2007

The paper develops a set of member functions in MATLAB that implement the tailoring in a way that allows objects to mimic structures. It takes advantage of a pair of standard, but relatively unknown, functions, subsref.m and subsasgn.m. The built-in versions operate on structures. Tailored versions, as long as MATLAB can find them, operate on objects. As tailored member functions, subsref.m and subsasgn.m are so critical to object-oriented programming that they share a place beside the constructor in the group of eight.

Chapter Contents:

  • 4.1 A Special Accessor and a Special Mutator
  • 4.1.1 A Short Side Trip to Examine Overloading
  • 4.1.1.1 Superiorto and Inferiorto
  • 4.1.1.2 The Built-in Function
  • 4.1.2 Overloading the Operators subsref and subsasgn
  • 4.1.2.1 Dot-Reference Indexing
  • 4.1.2.2 subsref Dot-Reference, Attempt 1
  • 4.1.2.3 A New Interface Definition
  • 4.1.2.4 subsref Dot-Reference, Attempt 2: Separating Public and Private Variables
  • 4.1.2.5 subsref Dot-Reference, Attempt 3: Beyond One-to-One, Public-to-Private
  • 4.1.2.6 subsref Dot-Reference, Attempt 4: Multiple Indexing Levels
  • 4.1.2.7 subsref Dot-Reference, Attempt 5: Operator Conversion Anomaly
  • 4.1.2.8 subsasgn Dot-Reference
  • 4.1.2.9 Array-Reference Indexing
  • 4.1.2.10 subsref Array-Reference
  • 4.1.2.11 subsasgn Array-Reference
  • 4.1.2.12 Cell-Reference Indexing
  • 4.1.3 Initial Solution for subsref.m
  • 4.1.4 Initial Solution for subsasgn.m
  • 4.1.5 Operator Overload, mtimes
  • 4.2 The Test Drive
  • 4.2.1 subsasgn Test Drive
  • 4.2.2 subsref Test Drive
  • 4.3 Summary
  • 4.4 Independent Investigations

Inspec keywords: object-oriented programming

Other keywords: MATLAB member function; subsasgn.m function; subsref.m function; MATLAB member structure; object-oriented programming

Subjects: Object-oriented programming

Preview this chapter:
Zoom in
Zoomout

Changing the Rules ... in Appearance Only, Page 1 of 2

| /docserver/preview/fulltext/books/pc/sbpc001e/SBPC001E_ch4-1.gif /docserver/preview/fulltext/books/pc/sbpc001e/SBPC001E_ch4-2.gif

Related content

content/books/10.1049/sbpc001e_ch4
pub_keyword,iet_inspecKeyword,pub_concept
6
6
Loading