1> [theta, rho] = cart2pol(-1,-1) theta = -2.3562 rho = 1.4142 2> % theta in gradi 2> theta * 180/pi ans = -135 3> cart2pol(-1,-1) ans = -2.3562 4> function [thetag, rho] = cart2polg(x, y) > % cart2polg fa la conversione in coordinate polari con theta in gradi > [theta, rho] = cart2pol(x,y); > thetag = theta * 180/pi; % conversione da radianti in gradi > end; 5> [a, b] = cart2polg(-1,-1) a = -135 b = 1.4142 6> [x, y] = pol2cart(-3/(4*pi), sqrt(2)) x = 1.3741 y = -0.33442 7> help pol2cart `pol2cart' is a function from the file C:\Programmi\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\general\pol2cart.m -- Function File: [X, Y] = pol2cart (THETA, R) -- Function File: [X, Y, Z] = pol2cart (THETA, R, Z) Transform polar or cylindrical to Cartesian coordinates. THETA, R (and Z) must be the same shape, or scalar. THETA describes the angle relative to the positive x-axis. R is the distance to the z-axis (0, 0, z). See also: cart2pol, cart2sph, sph2cart Additional help for built-in functions and operators is available in the on-line version of the manual. Use the command `doc ' to search the manual index. Help and information about Octave is also available on the WWW at http://www.octave.org and via the help@octave.org mailing list. 8> [x, y] = pol2cart(-3/4*pi, sqrt(2)) x = -1 y = -1.0000 9> help cart2sph `cart2sph' is a function from the file C:\Programmi\3.2.4_gcc-4.4.0\share\octave\3.2.4\m\general\cart2sph.m -- Function File: [THETA, PHI, R] = cart2sph (X, Y, Z) Transform Cartesian to spherical coordinates. X, Y and Z must be the same shape, or scalar. THETA describes the angle relative to the positive x-axis. PHI is the angle relative to the xy-plane. R is the distance to the origin (0, 0, 0). See also: pol2cart, cart2pol, sph2cart Additional help for built-in functions and operators is available in the on-line version of the manual. Use the command `doc ' to search the manual index. Help and information about Octave is also available on the WWW at http://www.octave.org and via the help@octave.org mailing list. 10> z1 = 1 * i; z2 = 4 + 2i; z3 = 6 + 8i; 11> triangolo = [z1 z2 z3 z1]; 12> z1 = 1 + i; z2 = 4 + 2i; z3 = 6 + 8i; 13> triangolo = [z1 z2 z3 z1]; 14> plot(triangolo); 15> axis equal; 16> hold on; 17> z = 0.5*(sqrt(3)/2+i/2); 18> plot(triangolo*z, 'r'); 19> hold off 20> theta = linspace(0, 2*pi); 21> plot(cos(theta), sin(theta)) 22> axis equal; 23> p = [1 -7 21 -35 35 -21 7 -1]; 24> roots(p) ans = 1.00752 + 0.00364i 1.00752 - 0.00364i 1.00181 + 0.00812i 1.00181 - 0.00812i 0.99481 + 0.00646i 0.99481 - 0.00646i 0.99173 + 0.00000i 25> quit