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

Change language to:
Français - 日本語 - Português - Русский

Please note that the recommended version of Scilab is 2025.0.0. This page might be outdated.
See the recommended documentation of this function

Scilab Help >> Elementary Functions > Complex > real

real

real part of complex numbers, polynomials, or rationals

Syntax

y = real(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

real(x) components are the real part of related x components (See %i to enter complex numbers).

Examples

real([1 %i 2])
real(1+0*%i)
real(2+3*%i)
real(1+%s)
real(sprand(3,3,0.1))

// With polynomials:
A = [1-%i*%z (%z-%i)^2]
real(A)

// With rationals:
A = [ %z/(1-%z)  (1-%z)/%z^2];
B = A(1,[2 1])
C = A + %i*B
A, real(C)

See also

  • imag — imaginary part of complex numbers, polynomials, or rationals

History

VersionDescription
6.0 Extension to rationals
Report an issue
<< isreal Complex Discrete mathematics >>

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:
Tue Feb 14 15:02:42 CET 2017