Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)
[clev, cint] = get_contour_int(dat, nlev);
[clev, cint] = get_contour_int(dat, nlev);
function [clev, cint] = get_contour_int(dat, nlev);
maxdat = max(max(dat));
mindat = min(min(dat));
bot = sign(mindat) * 10^floor(log10(abs(mindat))) * ...
ceil(10 ^ mod(log10(abs(mindat)),1));
top = sign(maxdat) * 10^floor(log10(abs(maxdat))) * ...
ceil(10 ^ mod(log10(abs(maxdat)),1));
cint = (top - bot) / nlev;
tem = 10 ^ (floor(log10(cint)));
cint = tem * ceil(((maxdat - mindat)/nlev)/tem);
clev = [(bot - rem(bot, cint)):cint:(top + rem(top, cint))];