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.
Shift is the shift vector in transformation
ShiftX etc. refer to the single components
of this vector.
The general transformation objects
to apply the affine-linear transformation to
2D and 3D objects, respectively. The shift vector b can
be accessed and changed via the attribute
Special transformation objects such as
plot::Translate3d correspond to special
matrices A and
They also allow to access and change the shift vector by the attribute
When setting the
Shift attribute, matrices,
arrays, and lists with 2 or 3 elements are accepted. Internally, however,
the shift data are always stored as the list
b2] in 2D or
b2, b3] in
3D, respectively. When reading the vector by a slot access, this list
The entries of
Shift can be animated.
We move an arrow along the y-axis:
T := plot::Translate2d([0, a], a = 0..5, plot::Arrow2d([0, 0], [1, 1])): plot(T)
Shift vector is the first argument in
the call above. It is stored in the corresponding slot of the translation
We change the shift vector:
T::Shift := [a, 0]: plot(T)