1 function displayprops(obj)
\r
2 % displayprops v0.1 (2005-06-09 14:12)
\r
4 % Displays the properties of an object
\r
6 % Toolbox for nonlinear filtering.
\r
7 % Copyright (C) 2005 Jakob Rosén <jakob.rosen@gmail.com>
\r
9 % This program is free software; you can redistribute it and/or
\r
10 % modify it under the terms of the GNU General Public License
\r
11 % as published by the Free Software Foundation; either version 2
\r
12 % of the License, or (at your option) any later version.
\r
14 % This program is distributed in the hope that it will be useful,
\r
15 % but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
16 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
17 % GNU General Public License for more details.
\r
19 % You should have received a copy of the GNU General Public License
\r
20 % along with this program; if not, write to the Free Software
\r
21 % Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
\r
23 [props,rprops]=pnames;
\r
25 % Determine the maximum character length of the property names
\r
27 for i=1:length(props); proplength=max(length(props{i}),proplength); end;
\r
28 for i=1:length(rprops); proplength=max(length(rprops{i}),proplength); end;
\r
30 fprintf('\nProperties:\n\n');
\r
32 fstring=strcat('%+',num2str(proplength),'s : %s\n');
\r
33 for i=1:length(props)
\r
34 fprintf(fstring,props{i},pformat(get(obj,props{i})));
\r
37 % If read-only properties exist, display them.
\r
39 fprintf('\nRead-only properties:\n\n');
\r
40 for i=1:length(rprops)
\r
41 fprintf(fstring,rprops{i},pformat(get(obj,rprops{i})));
\r