scale
缩放 polyshape
说明
示例
输入参数
polyin
— 输入 polyshape
标量 | 向量 | 矩阵 | 多维数组
输入 polyshape
,指定为标量、向量、矩阵或多维数组。
数据类型: polyshape
s
— 缩放因子
标量 | 二元素行向量
缩放因子,指定为标量或二元素行向量。s
的元素必须为正。
如果
s
是标量,则scale
会将此缩放因子同时应用于 x 和 y 方向。如果
s
是二元素行向量,则第一个元素是 x 方向的缩放因子,第二个元素是 y 方向的缩放因子。
当输入 polyshape
是数组时,scale
会将 s
应用于数组的每一个元素。
数据类型: double
| single
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
refpoint
— 参考点
[0 0]
| 二元素行向量
参考点,指定为包含缩放参考点的 x 坐标和 y 坐标的二元素行向量。当输入 polyshape
是数组时,数组的每个元素都相对于 refpoint
进行缩放。
数据类型: double
| single
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
扩展功能
C/C++ 代码生成
使用 MATLAB® Coder™ 生成 C 代码和 C++ 代码。
用法说明和限制:
必须启用动态内存分配才能进行代码生成。
名称-值对组必须为编译时常量。
版本历史记录
在 R2017b 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)