Domain of images of sets under mappings
MuPAD® notebooks are not recommended. 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.
Dom::ImageSet is the domain of all sets of
complex numbers that can be written as the set of all values taken
on by some mapping, i.e., sets of the form for
some function f and
some sets S1,
Image sets are mainly used by
solve to express sets like .
Dom::ImageSet belongs to the category
and set-theoretic operations are inherited from there.
Dom::ImageSet(f, x, S) represents the set
of all values that can be obtained by substituting some element of
Dom::ImageSet(f, [x1, ...], [S1, ...]) represents
the set of all values that can be obtained by substituting, for each i,
the identifier xi by
some element of Si in
Dom::ImageSet(f, x, S) represents the set .
[x1, ..., xn], [S1, ..., Sn]) represents the set .
f need not contain
on the other hand, it may contain other identifiers (free variables).
If a list of several identifiers is given, the identifiers must be distinct.
S must be a set; see
solve for an overview of the different
kinds of sets in MuPAD®.
Dom::ImageSet carries out some automatical
simplifications that may produce a result of a type different from
Dom::ImageSet renames the variables
..., xn, in order to avoid naming conflicts as well as producing
a nicer output.
We define S to be the set of all integer multiples of π.
S:= Dom::ImageSet(ugly*PI, ugly, Z_)
Our ugly variable name has been replaced by a nicer one which suggests that it represents an integer.
We may now apply the usual set-theoretic operations.
S intersect Dom::Interval(3..7)
An element of an image set may be obtained by substituting all parameters by some values:
S:= Dom::ImageSet(a^7 + b^3 + C, [a, b], [Z_, Z_])
On calling the
evalParam method, we have
to take care that the variable names have been replaced.
Dom::ImageSet::evalParam(S, k = 3, l = 5)
The same may be achieved using the index operator:
Substituting only for one parameter, we obtain an image set in the other parameter:
Dom::ImageSet::evalParam(S, k = 3)
A parameter may be substituted by itself, meaning that it becomes a free variable:
Dom::ImageSet::evalParam(S, k = k)
evalParam method cannot be used to substitute
a free variable:
Dom::ImageSet::evalParam(S, C = 3)
Identifier or indexed identifier
Set of any type
changevar— Change the name of a variable
The new variable
newvar must not equal any
element of the list of variables; this is not checked!
setvar— Set the name of the variable
For an argument
A that is not an image set,
"setvar" is applied to all image sets
contained in the expression
be, for example, a union, intersection, etc. of image sets and other
homogpointwise— Define an n-ary pointwise operator for image sets
Op must accept arithmetical expressions as
isEmpty— Test whether a set is empty
substituteBySet— Substitute an ImageSet for a variable
freeIndets— Free parameters of a set
If , the xi are called bound and the yi are called free parameters.
Use the slot
"variables" to obtain the bound
evalParam— Insert values for bound parameters
A(x = value, …))
x is not a parameter, but a free variable
A, it is not substituted by
value may be an identifier or contain identifiers;
in particular, it may contain
x and/or some of
the remaining parameters. This may be used to convert parameters into
Several parameters may be replaced in a single call.
See Example 2.
_index— Extract element by inserting values for bound parameters
The number of values passed must match the number of variables
It is not checked whether for each i, the value for the ith parameter belongs to the ith set.
See Example 2.
expr— Defining mapping as an expression
This method overloads the function
variables— List of variables
The free parameters (identifiers appearing in f other
than the xi)
can be obtained using the
nvars— Number of variables
sets— List of sets