function [g,alpha] = linstret(a,b,N)
%EXPSTRET computes a partition of [a,b] with exponentially increasing intervals
% [g,alpha] = expstret(dmin,a,b,N) computes the grid of size N on the
% interval [a,b] given by g = [x_1,x_2,...x_N]' with
%
% x_1 = a
% x_N = b
% x_j = x_j-1 + alpha*(j-1), j=2,...N-1
%
% for some alpha that is consistent with the inputs.
% Ellen McGrattan, 11-22-93
% Revised, 5-26-94
alpha = (b-a)*2/(N*N-N);
g(1) = a;
for i=2:N;
g(i) = g(i-1)+(i-1)*alpha;
end;