function x2=mapint(x,intv);
%MAPINT--maps data x on to interval defined by intv=[a,b]
%
% x2=mapint(x,intv);
%
%Maps the data in x on to the interval intv=[a,b].  This is accomplished by
%first mapping to [0 1] using map01, and then tranforming to the new
%interval.
%

%Map to interval [0 1]
x2=map01(x);

%Map to [a, b] by multiplying by (b-a) and adding a
x2=x2*(diff(intv))+intv(1);