Generalized Array Operations

Computes generalized array operations by expanding singleton dimensions.

您现在正在关注此提交

Computes functions of arrays where the singleton dimensions of each have been expanded to be the size of the other, without actually copying any data.

For example,

x = rand(4,3,1,2);
y = rand(4,1,5,2);
z = genop(@times,x,y);

size(z) will be [4 3 5 2].

引用格式

Douglas Schwarz (2026). Generalized Array Operations (https://ww2.mathworks.cn/matlabcentral/fileexchange/10333-generalized-array-operations), MATLAB Central File Exchange. 检索时间: .

致谢

启发作品: bsxfun substitute

类别

Help CenterMATLAB Answers 中查找有关 Operators and Elementary Operations 的更多信息

一般信息

MATLAB 版本兼容性

  • 兼容任何版本

平台兼容性

  • Windows
  • macOS
  • Linux
版本 已发布 发行说明 Action
1.0.0.0

Modified so it works with a function returning logical.