Documentation of get_contour_int


Global Index (all files) (short | long) | Local Index (files in subdir) (short | long)


Function Synopsis

[clev, cint] = get_contour_int(dat, nlev);

Help text


  [clev, cint] = get_contour_int(dat, nlev);


Listing of function get_contour_int

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))];