1 |
function theResult = undoc(theHandle) |
---|
2 |
|
---|
3 |
% undoc -- Undocumented properties of a handle. |
---|
4 |
% undoc(theHandle) returns or lists the names of the |
---|
5 |
% undocumented properties of theHandle (default = 0). |
---|
6 |
% |
---|
7 |
% Calls: none |
---|
8 |
|
---|
9 |
% Copyright (C) 1999 Dr. Charles R. Denham, ZYDECO. |
---|
10 |
% All Rights Reserved. |
---|
11 |
% Disclosure without explicit written consent from the |
---|
12 |
% copyright owner does not constitute publication. |
---|
13 |
|
---|
14 |
% Version of 20-Oct-1999 00:45:25. |
---|
15 |
% Updated 20-Oct-1999 08:04:08. |
---|
16 |
|
---|
17 |
if nargout > 0, theResult = {}; end |
---|
18 |
if nargin < 1, theHandle = 0; end |
---|
19 |
if ischar(theHandle), theHandle = eval(theHandle); end |
---|
20 |
|
---|
21 |
if isempty(theHandle), return, end |
---|
22 |
|
---|
23 |
theWarningState = warning; |
---|
24 |
warning('off') |
---|
25 |
|
---|
26 |
theUndocState = get(0, 'hideundocumented'); |
---|
27 |
|
---|
28 |
set(0, 'hideundocumented', 'on') |
---|
29 |
|
---|
30 |
a = get(theHandle); % Documented properties. |
---|
31 |
|
---|
32 |
set(0, 'hideundocumented', 'off') |
---|
33 |
|
---|
34 |
b = get(theHandle); % All properties. |
---|
35 |
|
---|
36 |
set(0, 'hideundocumented', theUndocState) % Restore. |
---|
37 |
|
---|
38 |
warning(theWarningState) % Restore. |
---|
39 |
|
---|
40 |
theNames = fieldnames(b); |
---|
41 |
|
---|
42 |
for i = length(theNames):-1:1 |
---|
43 |
if isfield(a, theNames{i}) |
---|
44 |
theNames(i) = []; |
---|
45 |
end |
---|
46 |
end |
---|
47 |
|
---|
48 |
if nargout > 0 |
---|
49 |
theResult = theNames; |
---|
50 |
else |
---|
51 |
disp(theNames) |
---|
52 |
end |
---|