minus, -
fi
对象之间的矩阵差
说明
是执行 C
= minus(A
,B
)A-B
的另一种方式。
注意
有关 Fixed-Point Designer™ 计算中涉及的 fimath
属性的信息,请参阅fimath Properties Usage for Fixed-Point Arithmetic和 fimath ProductMode and SumMode。
输入参数
A
— 输入数组
标量 | 向量 | 矩阵 | 多维数组
输入数组,指定为由 fi
对象或内置数据类型组成的标量、向量、矩阵或多维数组。输入 A
和 B
的大小必须相同或兼容。有关详细信息,请参阅基本运算的兼容数组大小。
minus
不支持数据类型为 boolean
的 fi
对象。
数据类型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| fi
复数支持: 是
B
— 输入数组
标量 | 向量 | 矩阵 | 多维数组
输入数组,指定为由 fi
对象或内置数据类型组成的标量、向量、矩阵或多维数组。输入 A
和 B
的大小必须相同或兼容。有关详细信息,请参阅基本运算的兼容数组大小。
minus
不支持数据类型为 boolean
的 fi
对象。
数据类型: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| fi
复数支持: 是
扩展功能
C/C++ 代码生成
使用 MATLAB® Coder™ 生成 C 代码和 C++ 代码。
使用说明和限制:
任何非
fi
输入必须为常量;也就是说,其值在编译时必须已知,以便将其转换为fi
对象。
HDL 代码生成
使用 HDL Coder™ 为 FPGA 和 ASIC 设计生成 VHDL、Verilog 和 SystemVerilog 代码。
版本历史记录
在 R2006a 之前推出R2021b: 隐式扩展更改会影响运算符的参数
从 R2021b 开始增加了 fi
的 times
、plus
和 minus
的隐式扩展,以前返回错误的基本运算的一些参数组合现在能够生成结果。
如果您的代码使用按元素运算符并依赖 MATLAB® 以前在出现大小不匹配情况时返回的错误,尤其是在 try/catch
代码块内,则您的代码可能不再捕获这些错误。
有关基本数组运算要求的输入大小的详细信息,请参阅基本运算的兼容数组大小。
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)