Integrating matrix minors without a loop
1 回表示 (過去 30 日間)
古いコメントを表示
I am trying to integrate all the 2x2 matrices A(i-1:1,j-1:j) without using a loop. Right now I am doing in a loop but it is extremely slow. The code is shown below:
A=rand(500);
t=linspace(0,1,500);
for i=2:length(A)
for j=2:length(A)
A_minor=A(i-1:i,j-1:j);
B(i,j)=trapz(t(j-1:j),trapz(t(i-1:i),A_minor));
end
end
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!