GNU Octave, version 2.1.36 (i686-pc-linux-gnu). Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 John W. Eaton. 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'. Report bugs to . octave> E=[1,2,3,1] E = 1 2 3 1 octave> E~=1 ans = 1 0 0 1 octave> E~=1 ans = 0 1 1 0 octave> any(E==1) ans = 1 octave> all(E==1) ans = 0 octave> E(E==1) ans = 1 1 octave> E(E~=1) ans = 2 3 octave> R=[3,4,5] R = 3 4 5 octave> R .^ 2 ans = 9 16 25 octave> R ^ 2 error: for A^b, A must be square error: evaluating binary operator `^' near line 13, column 3 octave> R .^ 2 ans = 9 16 25 octave> sum(R) ans = 12 octave> R R = 3 4 5 octave> [R,P, K, E]=residue([1],[1,0,1]) ans = 0.00000 - 0.50000i 0.00000 + 0.50000i octave> [R,P, K, E]=residue([1],[1,0,1]) R = 0.00000 - 0.50000i 0.00000 + 0.50000i P = 0 + 1i 0 - 1i K = [](0x0) E = 1 1 octave> ratint([1],[1,0,1], 0, 1) ans = 0.78540 octave> pi/4 ans = 0.78540 octave> ratint([1],[1,0],-1,1) warning: division by zero warning: in /usr/share/octave/2.1.36/m/polynomial/residue.m near line 209, column 9: >>> ## Determine if the poles are (effectively) real. >>> index = find (abs (imag (p) ./ real (p)) ans = 0.00000 - 3.14159i octave> [R,P, K, E]=residue([1],[1,0]) warning: division by zero warning: in /usr/share/octave/2.1.36/m/polynomial/residue.m near line 209, column 9: >>> ## Determine if the poles are (effectively) real. >>> index = find (abs (imag (p) ./ real (p)) R = 1 P = 0 K = [](0x0) E = 1 octave> A = [1, 2; 2, 1] A = 1 2 2 1 octave> b = [1; 2] b = 1 2 octave> x = A \ b x = 1 0 octave> A * x -b ans = 1 2 octave> A * x -b ans = 0 0 octave> A^3 ans = 13 14 14 13 octave> A^3.5 ans = 23.383 - 0.500i 23.383 + 0.500i 23.383 + 0.500i 23.383 - 0.500i octave> cosm(A) ans = -0.22485 -0.76515 -0.76515 -0.22485 octave> cos(A) ans = 0.54030 -0.41615 -0.41615 0.54030 octave>