How to left divide 4D arrays
1 回表示 (過去 30 日間)
古いコメントを表示
Mantas Vaitonis
2018 年 7 月 16 日
コメント済み: Mantas Vaitonis
2018 年 7 月 22 日
If I have two 2D gpuArrays f(NxM) and f1(NxM) of same size, then I can left divide them like this:
beta=arrayfun(@(n) f(:,n)\f1(:,n), 1:size(f,2));
What would be the way to do this if both f and f1 are 4D arrays of size (NxMxZxK)?
0 件のコメント
採用された回答
Walter Roberson
2018 年 7 月 16 日
beta = arrayfun(@(n) f(:,n)\f1(:,n), 1:numel(f)/size(f,1));
after which you will need to reshape() to the appropriate size.
15 件のコメント
Walter Roberson
2018 年 7 月 19 日
The left division of two real-valued column vectors A\B, is equal to the dot product of the two vectors divided by the square of the norm of A (that is, the sum of squares of the elements of A)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!