x = [100.00 200.00 315.65 587.65 417.35;
     100.00 489.32 780.65 249.35 105.16]
x(3,:) = 1;

a =  0.987;    b = -0.008;    c =  0.002;
d =  1.032;    e = 10.321;    f = 20.084;
g =  0.000087; h = -0.000154;

T = [a b e; c d f];

X = T*x

q = [g h 1]*x;
X(1,:) = X(1,:)./q;
X(2,:) = X(2,:)./q;

X
