cell multiplication with a vector
1 回表示 (過去 30 日間)
古いコメントを表示
Hi,
I have a cell structure (Aa), where each cell is a square sparse matrix and I need to multiply each cell with a vector (fi) to produce a matrix Aaf.
my code to do this is:
Aaf=zeros(numel(sig),length(Aa));
for j=1:length(Aa);
Aaf(:,j)=Aa{j}*fi;
end
but it seems to be pretty ineffective, so I' ve tried to evaluate it using a cellfun, but it doesn't work
Aaf_test = cellfun(@(x) x * fi(:,1),Aa);
Does anybody know ho do the multiplication faster than the for loop?
thanks
0 件のコメント
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!