<html style="direction: ltr;">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
<style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
</head>
<body style="direction: ltr;" bidimailui-charset-is-forced="true"
text="#000000" bgcolor="#FFFFFF">
Hello,<br>
<br>
I realize that MATLAB is proprietary software and thus not very
reproducible.<br>
However I would appreciate if someone could think if he has an idea
why this could happen.<br>
I will explain the issue with a simple example.<br>
I made a file 0.tmp with the contents:<br>
<br>
<pre class="language-matlab">35.049 31.728
</pre>
<br>
Running this command:<br>
<pre class="language-matlab">cs2cs +init=epsg:4326 +to +init=epsg:2039 <0.tmp >1.tmp</pre>
Produces this correct 1.tmp file:<br>
<pre class="language-matlab">204718.31        626160.79 -20.79
</pre>
However, when calling the exact same command from the matlab shell:<br>
<pre class="language-matlab">system(['cs2cs +init=epsg:4326 +to +init=epsg:2039 <0.tmp >1.tmp'])
</pre>
The resulting file 1.tmp only has these contents:<br>
<pre class="language-matlab">         -20.787</pre>
So, clearly, cs2cs is getting all of the input, since otherwise it
could not get the -20.79 right. The question is why would it not
also write 204718.31 626160.79 to the file?<br>
What weird thing could MATLAB be doing with the input that would
make cs2cs produce this partial output?<br>
<br>
Note: do not try to reproduce in Octave. It works fine in Octave.<br>
<br>
Thanks,<br>
Shimi.<br>
</body>
</html>