The problem occurs in one of the functions for coordinate transformations -

*cart2geo.m*. For some reason the function fails to approximate height precise enough. Further investigations are needed. At the moment a quick fix would be to modify the function

*cart2geo.m* as shown here (starting at line 30):

```
h = 0.1; oldh = 0;
```__iterations = 0;__
while abs(h-oldh) > 1.e-12
oldh = h;
N = c/sqrt(1+ex2*cos(phi)^2);
phi = atan(Z/((sqrt(X^2+Y^2)*(1-(2-f(i))*f(i)*N/(N+h)))));
h = sqrt(X^2+Y^2)/cos(phi)-N;
__iterations = iterations + 1;__
__if iterations > 100__
__fprintf('Failed to approximate h with desired precision. h-oldh: %e.\n', h-oldh);__
__break;__
__end__
end

```
```