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