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