How to reference multiple matrices in cell arrays using a colon or other special characters rather than a loop?
古いコメントを表示
Is there a way to pull values from multiple arrays without using loops? Specifically, I would like to achieve something like this:
for i = 1:5
for j = 1:3
new{i,j} = a1{i,j}./a2{i,j};
end
end
by doing something simpler and faster like:
new{:,:} = a1{:,:}./a2{:,:};
but this kicks back an error. Assuming all the cell arrays hold appropriately sized matrices, is a loop my only option for this?
採用された回答
その他の回答 (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!