フィルターのクリア

The use of cell array with bsxfun, that would return cell array.

2 ビュー (過去 30 日間)
Mantas Vaitonis
Mantas Vaitonis 2018 年 6 月 20 日
コメント済み: Joss Knight 2018 年 6 月 20 日
Hello,
I have two cell arrays x1{1x499}(1x5) and x2{1x499}(1x5) with variables of gpuArray and would like to subtract x2 from x1 and should return cell array x3{1x499}(1x5). I can achieve this with cellfun, but it is quite slow, especially when working with bigger arrays. Is there a way to make it work with bsxfun, because it can use multithreads? If I use bsxfun x3=bsxfun(@minus,[x1{:}],[x2{:}]), however it returns array of size (1x2495).
  8 件のコメント
Mantas Vaitonis
Mantas Vaitonis 2018 年 6 月 20 日
Thank You Adam for the clarification.
Joss Knight
Joss Knight 2018 年 6 月 20 日
bsxfun is mostly redundant now anyway because of implicit scalar dimension expansion. Just use the raw operator.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by