23.06.2015 Views

MATLAB Programming

MATLAB Programming

MATLAB Programming

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

9 Classes and Objects<br />

% POLYNOM/DIFF DIFF(p) is the derivative of the polynom p.<br />

c = p.c;<br />

d = length(c) - 1; % degree<br />

q = polynom(p.c(1:d).*(d:-1:1));<br />

Listing Class Methods<br />

The function call<br />

methods('classname')<br />

or its command form<br />

methods classname<br />

shows all the methods available for a particular class. For the polynom<br />

example, the output is<br />

methods polynom<br />

Methods for class polynom:<br />

char display minus plot polynom roots<br />

diff double mtimes plus polyval subsref<br />

9-36

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!