GpuArrays and Subtracting out the Mean

1 回表示 (過去 30 日間)
Science Machine
Science Machine 2022 年 9 月 3 日
回答済み: Walter Roberson 2022 年 9 月 3 日
I have a gpuArray
A = rand(5,5,3 ,'gpuArray')
which i think of as 3 5x5 matrices. I would like to find the elementwise average over the 3 matrices and then subtract from each element that average out
Is there a best way to do this for gpuArrays, that follows best Matlab practices (is vectorized)?

採用された回答

Walter Roberson
Walter Roberson 2022 年 9 月 3 日
A - mean(A, 3)

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGPU Computing についてさらに検索

タグ

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by