Previous Page Next Page Contents

id -- the identity map

Introduction

id(x) evaluates and returns x.

Call(s)

id(x)
id(x1, x2...)

Parameters

x, x1, x2, ... - arbitrary MuPAD objects

Returns

the sequence of the input parameters.

Details

Example 1

id returns the evaluated arguments:

>> a := 2: id(a + 2)
                                     4
>> id(a, b, 4 + 2)
                                  2, b, 6

id() returns null():

>> domtype(id())
                                 DOM_NULL
>> delete a:

Example 2

id is useful when working with functional expressions:

>> f := 3*id + sin + 5*id^2 + exp@(-id^2): f(x)
                                        2          2
                      3 x + sin(x) + 5 x  + exp(- x )
>> D(f)
                                                2
                     10 id + cos - 2 id exp@- id  + 3
>> delete f:

Changes




Do you have questions or comments?


Copyright © SciFace Software GmbH & Co. KG 2000