07-Jan-2022 19:05:52 DISTANCE_TO_POSITION_SPHERE_TEST(): MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Test DISTANCE_TO_POSITION_SPHERE(). DISTANCE_TO_POSITION_SPHERE MATLAB/Octave version 9.8.0.1380330 (R2020a) Update 2 Read a distance table for N points or cities on a sphere of a given radius. Assign coordinates to each point which will reproduce the distance table with the lowest discrepancy, in the least squares sense. Read the header of "ha30_dist.txt". Spatial dimension M = 3 Number of points N = 30 Read the data in "ha30_dist.txt". 5 by 5 portion of distance table: Col: 1 2 3 4 5 Row 1 0 39 22 59 54 2 39 0 20 20 81 3 22 20 0 39 74 4 59 20 39 0 93 5 54 81 74 93 0 Norm of First-order Iteration Func-count f(x) step optimality 0 61 961584 3.97e+04 1 122 484408 8.2076 1.96e+04 2 183 376955 3.32267 1.46e+04 3 244 278443 5.25849 1.59e+04 4 305 174397 2.26224 1.16e+04 5 366 114036 2.38223 1.51e+04 6 427 71215.7 3.36011 9.49e+03 7 488 55397.7 3.36376 1.21e+04 8 549 27652.1 1.25561 1.4e+04 9 610 27652.1 3.56065 1.4e+04 10 671 17324.4 0.890163 3.87e+03 11 732 12325.6 1.78033 1.24e+04 12 793 12325.6 1.61322 1.24e+04 13 854 4376.03 0.403304 6.16e+03 14 915 579.21 0.806608 2.82e+03 15 976 54.1631 0.85237 721 16 1037 33.8612 0.0276577 0.951 17 1098 33.8599 0.00283072 0.0106 18 1159 33.8599 0.000117447 0.000183 Local minimum possible. lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the value of the function tolerance. Least squares residual for solution is 5.818928e+00 Computed LL coordinates (in radians): Row: 1 2 Col 1 -0.000002 -0.000009 2 -0.988518 0.000011 3 -0.504301 0.228812 4 -1.655325 3.601608 5 2.378894 8.145027 6 -0.818397 -0.185588 7 -0.306188 4.843152 8 0.547654 0.622979 9 -0.390874 2.308852 10 0.465782 1.871779 11 -0.738603 0.062510 12 0.234015 1.154540 13 -0.358789 0.183092 14 -0.792780 2.352941 15 -0.107960 -3.096551 16 0.969467 0.721574 17 0.412401 0.474021 18 -0.698715 0.428928 19 0.756871 0.574727 20 0.482863 0.424299 21 0.967753 0.040622 22 -0.388943 0.138178 23 0.544702 -0.999241 24 -0.527259 0.013805 25 0.620058 1.183123 26 0.937676 -1.335119 27 0.455424 1.110829 28 -0.772980 1.926422 29 3.195177 -0.052749 30 -2.641963 -1.254852 Computed XYZ coordinates: Row: 1 2 3 Col 1 39.590000 -0.000363 0.000071 2 21.771649 0.000241 33.066046 3 33.758138 7.861965 19.129708 4 2.995040 1.483944 39.448647 5 8.213357 -27.418795 -27.351756 6 26.590900 -4.992392 28.902736 7 4.922090 -37.426374 11.933468 8 27.450394 19.720779 -20.613948 9 -24.629013 27.078838 15.083646 10 -10.486496 33.782359 -17.780712 11 29.216050 1.828691 26.654200 12 15.571470 35.222419 -9.180340 13 36.449424 6.749187 13.901656 14 -19.584310 19.712165 28.200238 15 -39.319587 -1.772220 4.265845 16 16.815388 14.795116 -32.645296 17 32.271598 16.556464 -15.868067 18 27.566863 12.607004 25.465655 19 24.157458 15.645762 -27.184471 20 31.954455 14.435082 -18.382310 21 22.435012 0.911853 -32.606853 22 36.283881 5.045780 15.012933 23 18.316587 -28.478826 -20.514073 24 34.210000 0.472309 19.920365 25 12.180358 29.829093 -23.005047 26 5.469520 -22.776433 -31.916869 27 15.783437 31.859465 -17.413377 28 -9.867262 26.566565 27.644581 29 -39.478190 2.084365 2.120394 30 -10.797472 33.030493 18.967583 5 by 5 portion of computed distance table: Col: 1 2 3 4 5 Row 1 0 39.1354 21.7618 59.1899 53.9142 2 39.1354 0 20.2114 20.1024 81.243 3 21.7618 20.2114 0 38.9696 74.0209 4 59.1899 20.1024 38.9696 0 92.8123 5 53.9142 81.243 74.0209 92.8123 0 Wrote the recomputed distance data to "ha30_dist.dist2.txt". Wrote the XYZ data to "ha30_dist.xyz.txt". Wrote the Latitude/Longitude data (in degrees) to "ha30_dist.latlon.txt". DISTANCE_TO_POSITION_SPHERE Normal end of execution. DISTANCE_TO_POSITION_SPHERE_TEST(): Normal end of execution. 07-Jan-2022 19:05:53