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=[1;1]; B=[3;-1]; C=[4;3]; P=[5;-7]; Q=[7;-2]; R=[2;-1]; octave:2> homo = @(v) [v;1]; octave:3> T1 = [homo(A) homo(B) homo(C)] T1 = 1 3 4 1 -1 3 1 1 1 octave:4> T2 = [homo(P) homo(Q) homo(R)] T2 = 5 7 2 -7 -2 -1 1 1 1 octave:5> aff = @(v) v(1:2)/v(3); octave:6> aff((T2/T1) * homo(A)) ans = 5.0000 -7.0000 octave:7>
Comments
0 B
|👍
/👎