MATLAB Object-Oriented Programming

(Joyce) #1

Operations on Objects


In this section...
“Object Operations” on page 5-44
“Help on Objects” on page 5-45
“Functions to Test Objects” on page 5-47
“Functions to Query Class Components” on page 5-47

Object Operations


A fundamental purpose of objects is to contain data and facilitate ways to manipulate that
data. Objects often define their own version of ordinary MATLAB functions that work with
the object. For example, you can create a timeseries object and pass the object to
plot:

ts = timeseries(rand(100,1),.01:.01:1,'Name','Data1');
plot(ts)

5 Class Definition—Syntax Reference

Free download pdf