function [a,b] = rstoab(r,s)

% transforms r,s to a,b used for evaluating the basis for Vandermonde matrix

N_p = length(r);
a = zeros(1,N_p);

for i = 1:N_p
	if s(i) == 1
		a(i) = -1;
	else
		a(i) = 2 * ((1 + r(i)) / (1 - s(i))) - 1;
	end
end
b = s;

end
