Documentation

# `signIm`

Sign of the imaginary part of a complex number

MuPAD® notebooks will be removed in a future release. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

## Syntax

```signIm(`z`)
```

## Description

`signIm(z)` represents the sign of `Im(z)`.

`signIm(z)` indicates whether the complex number `z` lies in the upper or in the lower half plane: `signIm(z)` yields 1 if ```Im(z) > 0```, or if `z` is real and ```z < 0```. At the origin: `signIm(0)=0`. For all other numerical arguments, - 1 is returned. Thus, `signIm(z)=sign(Im(z))` if `z` is not on the real axis.

If the position of the argument in the complex plane cannot be determined, then a symbolic call is returned. If appropriate, the reflection rule `signIm(-x)` = `-``signIm(x)` is used.

The functions `diff` and `series` treat `signIm` as a constant function. Cf. Example 2.

The following relation holds for arbitrary complex z and p: .

Further, for arbitrary complex z: and .

## Environment Interactions

Properties of identifiers set via `assume` are taken into account.

## Examples

### Example 1

For numerical values, the position in the complex plane can always be determined:

```signIm(2 + I), signIm(- 4 - I*PI), signIm(0.3), signIm(-2/7), signIm(-sqrt(2) + 3*I*PI)```
` `

Symbolic arguments without properties lead to symbolic calls:

`signIm(x), signIm(x - I*sqrt(2))`
` `

Properties set via `assume` are taken into account:

`assume(x, Type::Real): signIm(x - I*sqrt(2))`
` `
`assume(x > 0): signIm(x)`
` `
`assume(x < 0): signIm(x)`
` `
`assume(x = 0): signIm(x)`
` `
`unassume(x):`

### Example 2

`signIm` is a constant function, apart from the jump discontinuities along the real axis. These discontinuities are ignored by `diff`:

`diff(signIm(z), z)`
` `

Also `series` treats `signIm` as a constant function:

`series(signIm(z/(1 - z)), z = 0)`
` `

## Parameters

 `z` An arithmetical expression representing a complex number

## Return Values

Either , 0, or a symbolic call of type `"signIm"`.

`z`