Add a vector to a matrix and create a 3D array.

Without using for loop, how can I add a row or column vector V to a 2D matrix M and create a 3D array A with ith page of the array is calculated by (V(i) + M).
Is bsxfun always faster than for loop?

回答(1 个)

类别

帮助中心File Exchange 中查找有关 Loops and Conditional Statements 的更多信息

标签

提问:

AA
2020-6-6

评论:

2021-11-15

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by