Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2024.1.0 - English


imag

imaginary part of complex numbers, polynomials, or rationals

Syntax

y = imag(x)

Arguments

x

matrix of real or complex numbers (full or sparse storage), or of polynomials or rationals with real or complex coefficients.

y

matrix of real numbers, polynomials or rationals, with same sizes than x.

Description

imag(x) is the imaginary part of x. (See %i to enter complex numbers).

Examples

c = [ 2 %i, 1+0*%i, 2-3*%i  log(-1) (-1)^(1/3) ]
imag(c)

s = sprand(3,3,0.3) + sprand(3,3,0.3)*%i
imag(s)

// Polynomials with complex coefficients:
A = [1-%i*%z (%z-%i)^2]
imag(A)

// Rationals with complex coefficients:
A = [ %z/(1-%z)  (1-%z)/%z^2];
B = A(1,[2 1]);
C = A + %i*B
B, imag(C)

See also

  • real — real part of complex numbers, polynomials, or rationals

History

VersionDescription
6.0 Extension to rationals
Report an issue
<< csgn Complex numbers imult >>

Copyright (c) 2022-2024 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jun 17 17:49:15 CEST 2024