get.m, set.m

get.m, set.m

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

Buy chapter PDF
(plus tax if applicable)
Buy Knowledge Pack
10 chapters for $120.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
Your details
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.

One of the exercises in a previous paper examines the possible benefits of developing one get and one set instead of a get and set pair for every public variable. That was before the implementations of subsref and subsasgn. Since subsref and subsasgn provide such an elegant, natural interface, perhaps there is no longer a need for get or set. There are still benefits, but it seems the most compelling reasons were stolen away by subsref and subsasgn. This paper examines some of the benefits and define implementations for get and set that add quite a lot of flexibility. The functions get and set complete the membership roles for the group of eight.

Chapter Contents:

  • 8.1 Arguments for the Member Functions get and set
  • 8.1.1 For Developers
  • 8.1.2 For Clients
  • 8.1.3 Tab Completion
  • 8.2 Code Development
  • 8.2.1 Implementing get and set
  • 8.2.2 Initial get.m
  • 8.2.3 Initial set.m
  • 8.3 The Test Drive
  • 8.4 Summary
  • 8.5 Independent Investigations

Inspec keywords: object-oriented programming

Other keywords: get.m; set development; public variable; get development; membership role; Matlab; subsref; set.m; subsasgn

Subjects: Object-oriented programming

Preview this chapter:
Zoom in

get.m, set.m, Page 1 of 2

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

Related content

This is a required field
Please enter a valid email address