box% octave GNU Octave, version 5.2.0 Copyright (C) 2020 John W. Eaton and others. This is free software; see the source code for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, type 'warranty'. Octave was configured for "x86_64-pc-linux-gnu". Additional information about Octave is available at https://www.octave.org. Please contribute if you find this software useful. For more information, visit https://www.octave.org/get-involved.html Read https://www.octave.org/bugs.html to learn how to submit bug reports. For information about changes from previous versions, type 'news'. octave:1> A = [ 29.72 -14.892 53.778]; B = [ 33.422 -14.57 53.145]; C = [ 32.351 -16.136 54.869]; octave:2> M = C + ((2*[A-C; B-C]*[A-C; B-C]')\([A*A'-C*C'; B*B'-C*C']-2*[A-C; B-C]*C'))'*[A-C; B-C] M = 31.614 -14.897 53.631 octave:3> [norm(A-M) norm(B-M) norm(C-M)] ans = 1.9001 1.9001 1.9001 octave:4>
Comments
0 B
|👍
/👎