[Matlab] Gauss-Seidel et Cholesky [Résolu/Fermé]
A voir également:
- Algorithme de cholesky matlab
- Cholesky matlab - Meilleures réponses
- Méthode de cholesky avec matlab - Meilleures réponses
- [Matlab] Gauss-Seidel et Cholesky ✓ - Forum - Matlab
- Méthode de Cholesky ✓ - Forum - Matlab
- Implémentation de la methode de Cholesky en MATLAB - Forum - Matlab
- Resolution de AX=b par la méthode de cholesky - Forum - Programmation
- Cholesky et factorisation lu Matlab ✓ - Forum - Matlab
2 réponses
ramirez
function B=cholesky(A)
[n,m]=size(A);
if m ~=n
Error('A n est pas une matrice carre')
end
B=zeros(size(A));
for j=1:n
S(j,j)=A(j,j)
for k=1:j-1
S(j,j)=S(j,j)-B(j,k)^2;
end
B(j,j)=sqrt(S(j,j));
for i=j+1:n
B(i,j)=A(i,j)
for k=1:j-1
B(i,j)=A(i,j)-B(i,k)*B(j,k);
end
B(i,j)=B(i,j)/B(j,j)
end
end
[n,m]=size(A);
if m ~=n
Error('A n est pas une matrice carre')
end
B=zeros(size(A));
for j=1:n
S(j,j)=A(j,j)
for k=1:j-1
S(j,j)=S(j,j)-B(j,k)^2;
end
B(j,j)=sqrt(S(j,j));
for i=j+1:n
B(i,j)=A(i,j)
for k=1:j-1
B(i,j)=A(i,j)-B(i,k)*B(j,k);
end
B(i,j)=B(i,j)/B(j,j)
end
end
Signaler
felecity
merci bcp
Signaler
sinox
thank ya !
Fee Fay
- Messages postés
- 635
- Date d'inscription
- vendredi 17 octobre 2008
- Statut
- Membre
- Dernière intervention
- 31 mai 2009
Bonjour mon ami !
Google, connais-tu ?
Les fonctions Matlab help et doc, connais-tu ?
help mldivide, doc mldivide, cela te dit-il quelque chose ?
https://www.mathworks.com/help/matlab/ref/mldivide.html;jsessionid=af3aaacad54d3eef6c89c720c4a9
Comme tu as donc pu le constater, Google est ton ami !
http://matlabdb.mathematik.uni-stuttgart.de/download.jsp?MC_ID=3&MP_ID=406
Je te souhaite une bien bonne journée !
Google, connais-tu ?
Les fonctions Matlab help et doc, connais-tu ?
help mldivide, doc mldivide, cela te dit-il quelque chose ?
https://www.mathworks.com/help/matlab/ref/mldivide.html;jsessionid=af3aaacad54d3eef6c89c720c4a9
5. If A is symmetric, or Hermitian, and has real positive diagonal elements, then a Cholesky factorization is attempted (see chol). If A is found to be positive definite, the Cholesky factorization attempt is successful and requires less than half the time of a general factorization. Nonpositive definite matrices are usually detected almost immediately, so this check also requires little time.En d'autres termes, Matlab utilise lui-même automatiquement la factorisation de Cholesky si la matrice est symétrique réelle ou hermitienne complexe. Il n'y a rien à programmer du tout.
Comme tu as donc pu le constater, Google est ton ami !
http://matlabdb.mathematik.uni-stuttgart.de/download.jsp?MC_ID=3&MP_ID=406
Je te souhaite une bien bonne journée !