MATLAB 帮助中心
Change size of shape by fixed factor
scale(shape,factor)
c = scale(shape,factor)
scale(shape,factor) scales the shape by a constant scaling factor and plots the resultant shape.
shape
factor
example
c = scale(shape,factor) scales the shape by a constant scaling factor and returns a shape object.
c
collapse all
Create a rectangular shape.
r = antenna.Rectangle; show(r) axis equal
Shrink the rectangle by 50%.
scale(r,0.5);
Shape to scale, specified as one of the following objects:
2-D shapes without material properties:
antenna.Circle
antenna.Ellipse
antenna.Polygon
antenna.Rectangle
antenna.Triangle
2-D and 3-D shapes with material properties:
shape.Circle
shape.Ellipse
shape.Rectangle
shape.Polygon
shape.Box
shape.OpenBox
shape.Cylinder
shape.OpenCylinder
shape.Sphere
shape.Custom3D
Example: antenna.Rectangle
Example: shape.Polygon
Example: shape.Box
Constant factor to change shape size, specified as a scalar.
Example: 2
2
Data Types: double
double
Resultant shape obtained after the scaling operation on the input shape, returned as a shape object.
Introduced in R2017a
add | subtract | area | intersect | rotate | rotateX | rotateY | rotateZ | show | mesh | plot
add
subtract
area
intersect
rotate
rotateX
rotateY
rotateZ
show
mesh
plot
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处