-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathdemmap.m
More file actions
34 lines (30 loc) · 804 Bytes
/
demmap.m
File metadata and controls
34 lines (30 loc) · 804 Bytes
1
2
3
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
function varargout=demmap
% DEMMAP
% [dem,dax,ziro]=DEMMAP;
%
% Sets the colormap to one good for digital elevation models, or merely
% outputs three variables useful to do this elsewhere.
%
% OUTPUT:
%
% dem The color map
% dax The data values of the extremes of the color map
% ziro The index into the colormap where the data is zero
%
% See also CAX2DEM, SERGEICOL, ADDCB
%
% Last modified by fjsimons-at-alum.mit.edu, 09/29/2008
if ~exist('demmapm')
load(fullfile(getenv('IFILES'),'COLORMAPS','topo'))
end
% Supply the minimum and maximum data values to which these apply
% load topo; mima=minmax(topo);
mima=[-7473 5731];
if nargout
varargout{1}=demmapm;
varargout{2}=mima;
varargout{3}=36; % Used to be 37 for some reason
else
colormap(demmapm)
caxis(mima)
end