edro@euler ~ $ octave GNU Octave, version 2.9.17 Copyright (C) 2007 John W. Eaton and others. This is free software; see the source code for copying conditions. There is ABSOLUTELY NO WARRANTY; not even for MERCHANTIBILITY or FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'. Octave was configured for "x86_64-unknown-linux-gnu". Additional information about Octave is available at http://www.octave.org. Please contribute if you find this software useful. For more information, visit http://www.octave.org/help-wanted.html Report bugs to (but first, please read http://www.octave.org/bugs.html to learn how to write a helpful report). For information about changes from previous versions, type `news'. octave:1> tx = ty = linspace (-8, 8, 41)'; octave:2> [xx, yy] = meshgrid (tx, ty); octave:3> r = sqrt (xx .^ 2 + yy .^ 2) + eps; octave:4> tz = sin (r) ./ r; octave:5> mesh (tx, ty, tz); octave:6> octave:6> axis off octave:7> A=[1 2 1; -2 3 1]' A = 1 -2 2 3 1 1 octave:8> rank(A) ans = 2 octave:9> A=[0 1 1; 0 1 -1] A = 0 1 1 0 1 -1 octave:10> rank(A) ans = 2 octave:11> null(A) ans = -1.00000 0.00000 0.00000 octave:12> sol=null(A) sol = -1.00000 0.00000 0.00000 octave:16> alfa=-3:0.5:3; octave:17> plot3 (alfa,alfa*0,alfa*0) Warning: empty cb range [-0:-0], adjusting to [-1:1] octave:18> grid on Warning: empty cb range [-0:-0], adjusting to [-1:1] octave:19> xlabel ('x'); ylabel ('y'); zlabel ('z') Warning: empty cb range [-0:-0], adjusting to [-1:1] octave:20> A=[1 1 0] A = 1 1 0 octave:21> null(A) ans = -0.70711 0.00000 0.70711 0.00000 0.00000 1.00000 octave:24> [Y,Z]=meshgrid (y,z); octave:25> surf(-Y,Y,Z) octave:26> xlabel ('x'); ylabel ('y'); zlabel ('z') octave:27> axis([-3,3,-3,3,-3,3]) octave:28> A=[1 1 1 0;-1 1 0 1; 1 3 2 1; -3 1 -1 2]' A = 1 -1 1 -3 1 1 3 1 1 0 2 -1 0 1 1 2 octave:29> rank(A) ans = 2 octave:30> [l,V,p]=lu(A'); V' ans = -3.00000 0.00000 0.00000 0.00000 1.00000 3.33333 0.00000 0.00000 -1.00000 1.66667 0.00000 0.00000 2.00000 1.66667 0.00000 0.00000 octave:31> [l,U,p]=lu(A); U U = 1 -1 1 -3 0 2 2 4 0 0 0 0 0 0 0 0 octave:32> clear octave:33> A=[2 8 -2; 1 -17 6;9 6 1]' A = 2 1 9 8 -17 6 -2 6 1 octave:34> A=[2 8 -2; 1 -17 6;9 6 1] A = 2 8 -2 1 -17 6 9 6 1 octave:35> rank(A) ans = 2 octave:36> [l,U,p]=lu(A); U U = 9.00000 6.00000 1.00000 0.00000 -17.66667 5.88889 0.00000 0.00000 0.00000 octave:37> [l,V,p]=lu(A'); V' ans = 8.00000 0.00000 0.00000 -17.00000 5.25000 0.00000 6.00000 7.50000 0.00000 octave:38> B=[3 -4 0 4;2 4 -2 0; 3 -2 4 -4] B = 3 -4 0 4 2 4 -2 0 3 -2 4 -4 octave:39> rank(B) ans = 3 octave:40> [l,V,p]=lu(B'); V' ans = -4.00000 0.00000 0.00000 4.00000 5.00000 0.00000 -2.00000 1.50000 -7.20000 octave:41> [l,U,p]=lu(B); U U = 3.00000 -4.00000 0.00000 4.00000 0.00000 6.66667 -2.00000 -2.66667 0.00000 0.00000 4.60000 -7.20000 octave:42>