ed =
One to thirteen'
1 2 3 4 5 6 7 8 9 10 11 12 13The ExtendDouble inherits converter methods from the double class. For example,
MATLAB calls the char method to perform this assignment statement.ed(11:13) = ['a','b','c']ed =
one to thirteen
1 2 3 4 5 6 7 8 9 10 97 98 99Class of Value Returned by Indexing ExpressionThe ExtendDouble implements two forms of indexed reference in the subsref method:- obj.Data and obj.Data(ind) — Return values of class double
- obj(ind) — Return values of class ExtendDouble
For example, compare the values returned by these expressions.ed = ExtendDouble(1:10,'One to ten');
a = ed(1)a =One to ten
1b = ed.Data(1)b =1whosName Size Bytes Class Attributesa 1x1 132 ExtendDouble
b 1x1 8 double
ed 1x10 204 ExtendDouble12 How to Build on Other Classes