Integrating matrix minors without a loop
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!