This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Scale, ScaleX, ScaleY, ScaleZ

Scaling factors

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.

Value Summary

ScaleLibrary wrapper for “[ScaleX, ScaleY]” (2D), “[ScaleX, ScaleY, ScaleZ]” (3D)List of 2 or 3 expressions, depending on the dimension
ScaleX, ScaleY, ScaleZOptionalMuPAD® expression

Graphics Primitives

ObjectsDefault Values

Scale: [1, 1]

ScaleX, ScaleY: 1


Scale: [1, 1, 1]

ScaleX, ScaleY, ScaleZ: 1


Scale defines the scaling factors used by plot::Scale2d and plot::Scale3d.

ScaleX etc. correspond to the factors in the single coordinate directions.

The scaling objects plot::Scale2d and plot::Scale3d apply the scaling transformation with the matrix A = diag(sx, sy) in 2D and A = diag(sx, sy, sz) in 3D, repectively.

Scale is the list [sx, sy] resp. [sx, sy, sz] of the scaling factors. The attributes ScaleX etc. correspond to sx etc.

These attributes can be animated.


Example 1

We start with a 2D circle:

c := plot::Circle2d(3, [3, 3]):

We apply a scaling transformation:

S := plot::Scale2d([2, 3], c):
plot(c, S):

The scaling factors are stored as the Scale attribute in the scaling object S:

S::Scale, S::ScaleX, S::ScaleY

We change the scaling factors:

S::Scale := [-2, -3]:
plot(c, S):

delete c, S:

See Also

MuPAD Functions

Was this topic helpful?