Newer
Older
function display(self)
% display netcdf object
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
% diplay help in hypertext link
% -----------------------------
fprintf('<a href="matlab:help netcdf">netcdf</a>\n\n');
if self.mode ~= -1
fprintf('\tfile: ''%s''\n', self.file);
end
%fprintf('\tdynaload: ''%s''\n', self.dynaload);
fprintf('\tmode: ''%s''\n', self.mode);
if self.autonan
theAutonan = 'true';
else
theAutonan = 'false';
end
fprintf('\tautonan: %s\n', theAutonan);
if self.autoscale
theAutoscale = 'true';
else
theAutoscale = 'false';
end
fprintf('\tautoscale: %s\n\n', theAutoscale);
% call protected function hashtable.elements that return
% <nx2> cell array of key/value
% ------------------------------------------------------
result = elements(self);
% % get workspace variables
% % -----------------------
% wks = whos('global');
% for i=1:length(wks)
% if strcmp(wks(i).class, '.netcdf')
% var = wks(i).name;
% end
% end
% loop over key
% -------------
%nb = size(result);
for key = result'
fprintf('\t%-25s\t%2d [%-10s]\n', ...
key{1}, size(key{2}), class(key{2}));
end
fprintf('\n');
% diplay methods list in hypertext link
% -------------------------------------
disp('list of <a href="matlab:methods(''.netcdf'')">methods</a>');