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.
get.m, set.m, Page 1 of 2
< Previous page Next page > /docserver/preview/fulltext/books/pc/sbpc001e/SBPC001E_ch8-1.gif /docserver/preview/fulltext/books/pc/sbpc001e/SBPC001E_ch8-2.gif