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.
|Inherited||Positive real numberReal number|
Scaling = Constrained, the graphics
output is scaled like the model coordinates, i.e., circle appear as
circles, spheres as spheres.
Scaling = Unconstrained, the graphics
output is scaled independently in each coordinate direction such that
the graphics fits optimally into the viewing area. Circles may appear
as ellipses, spheres as ellipsoids.
Scaling = Unconstrained, the scaling
ratios of the different coordinate directions in a 3D plot can be
set via the attributes
If the graphics consists of geometrical objects such as circles,
pie charts, spheres etc., the setting
Scaling = Constrained is
appropriate. This prevents circles from being deformed to ellipses
in the graphical output.
For the visualization of non-geometrical data (usually, in function
plots etc.), a scaling constrained to model coordinates is usually
not appropriate. Think of the graph of y = ex for ,
where the y values
extend over the range ,
which is roughly .
Scaling = Constrained, the graphical output
would consist of a narrow vertical strip with the side ratio
: x = 22025 : 10. Here,
Scaling = Unconstrained is
The default value is
Scaling = Unconstrained.
However, many “geometrical” objects in the MuPAD®
override this default setting via the “hint mechanism”
(see section Primitives
Requesting Special Scene Attributes: “Hints” in
this document). Whenever such an object is plotted in a scene, the
whole scene uses
Scaling = Constrained. A complete
list of these “geometrical objects” such as circles,
spheres, cones etc. is given further up on this help page.
Scaling = Automatic, the graphics uses
= Constrained for plots in which the coordinate ranges to
be displayed have a ratio close to
1 : 1 in 2D
1 : 1 : 1 in 3D. Otherwise,
= Unconstrained is used.
YXRatio = r1 and
= r2 only have an effect in 3D with
= Unconstrained. The graphical scene is scaled to a box
with side ratios
z : y : x = r2: r1:
1. On the screen, the bounding box of the scene looks like
a box with these side ratios.
We plot a scene containing a function graph and some circles
highlighting the extrema. Because the circle sends the “hint”
this scaling is used for the whole scene. Consequently, the circles
appear as circles:
plot(plot::Function2d(sin(x), x = 0 .. 2*PI), plot::Circle2d(0.2, [PI/2, 1], Color = RGB::Black), plot::Circle2d(0.2, [3*PI/2, -1], Color = RGB::Black), BorderWidth = 1.0*unit::mm, Header = "Scaling = Constrained")
Scaling = UnConstrained, we get a better
fit of the plot in the canvas. However, the circles are deformed to
plot(plot::Function2d(sin(x), x = 0 .. 2*PI), plot::Circle2d(0.2, [PI/2, 1], Color = RGB::Black), plot::Circle2d(0.2, [3*PI/2, -1], Color = RGB::Black), Scaling = Unconstrained, BorderWidth = 1.0*unit::mm, Header = "Scaling = Unconstrained")
A sphere of type
plot::Sphere sends the “hint”
With this scaling,
s := plot::Sphere(1, [0, 0, 0]): plot(s, BorderWidth = 0.5*unit::mm, Header = "Scaling = Constrained", YXRatio = 3, ZXRatio = 10)
Scaling = Unconstrained. With the
YXRatio = 1,
2/3, the objects in a 3D scene are displayed like a box
with side ratios
X : Y : Z = 3 : 3 : 2:
plot(s, BorderWidth = 0.5*unit::mm, Scaling = Unconstrained, Header = "X:Y:Z = 3:3:2")
We request different scaling ratios:
plot(s, BorderWidth = 0.5*unit::mm, Header = "X:Y:Z = 5:5:1", Scaling = Unconstrained, YXRatio = 1, ZXRatio = 1/5, BorderWidth = 0.5*unit::mm)
plot(s, BorderWidth = 0.5*unit::mm, Header = "X:Y:Z = 7:3:1", Scaling = Unconstrained, YXRatio = 3/7, ZXRatio = 1/7, BorderWidth = 0.5*unit::mm)