for loop vectorization using cells
古いコメントを表示
I am trying to vectorize following loop:
for i = 1: size(s{2},1)
locCOR(i) = 0;
for j = 1 : size(s,2)
locCOR(i) = locCOR(i) + s{j}(i);
end
end
where s is a cell
Columns 1 through 4
[36x1 double] [36x1 double] [36x1 double] [36x1 double]
Columns 5 through 8
[36x1 double] [36x1 double] [36x1 double] [36x1 double]
Can somebody help me out?
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および 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!