numel
fi
数组中数据元素的数目
说明
示例
二维 fi 数组中的元素数
创建一个由 fi
对象组成的 2×3 数组。
X = fi(ones(2,3),1,24,12)
X = 1 1 1 1 1 1 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 24 FractionLength: 12
numel
对矩阵中的 6 个元素进行计数。
n = numel(X)
n = 6
多维 fi 数组中的元素数目
创建一个由 fi
对象组成的 2×3×4 数组。
X = fi(ones(2,3,4),1,24,12)
X = (:,:,1) = 1 1 1 1 1 1 (:,:,2) = 1 1 1 1 1 1 (:,:,3) = 1 1 1 1 1 1 (:,:,4) = 1 1 1 1 1 1 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 24 FractionLength: 12
numel
对矩阵中的 24 个元素进行计数。
n = numel(X)
n = 24
输入参数
A
— 输入数组
标量 | 向量 | 矩阵 | 多维数组
输入数组,指定为由 fi
对象组成的标量、向量、矩阵或多维数组。
复数支持:是
扩展功能
C/C++ 代码生成
使用 MATLAB® Coder™ 生成 C 代码和 C++ 代码。
版本历史记录
在 R2013b 中推出
另请参阅
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)