12.07.2015 Views

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

166 <strong>GNU</strong> <strong>Octave</strong>round (x)Mapping FunctionReturn the integer nearest to x. If x is complex, return round (real (x)) + round(imag (x)) * I.sign (x)Compute the signum function, which is defined as⎧⎨ 1, x > 0;sign(x) = 0, x = 0;⎩−1, x < 0.Mapping FunctionFor complex arguments, sign returns x ./ abs (x).sqrt (x)Mapping FunctionCompute the square root of x. If x is negative, a complex result is returned. Tocompute the matrix square root, see Chapter 20 [Linear Algebra], <strong>page</strong> 175.19.2 Complex ArithmeticThe following functions are available for working with complex numbers. Each expectsa single argument. Given a matrix they work on an element by element basis. In thedescriptions of the following functions, z is the complex number x + iy, where i is definedas √ −1.abs (z)Compute the magnitude of z, defined as |z| = √ x 2 + y 2 .For example,abs (3 + 4i)⇒ 5Mapping Functionarg (z)angle (z)Compute the argument of z, defined as θ = tan −1 (y/x). in radians.For example,arg (3 + 4i)⇒ 0.92730conj (z)Return the complex conjugate of z, defined as ¯z = x − iy.Mapping FunctionMapping FunctionMapping Functionimag (z)Return the imaginary part of z as a real number.Mapping Functionreal (z)Return the real part of z.Mapping Function

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!