How to do a gauss partial pivot?
Afficher commentaires plus anciens
Hi,
For each row, I want to find the absolute maximum and divide the other elements on the same row with the maximum. I want to do this with each row.
A = [1 2 3; 2 -1 1; 1 1 1]
n = size (A,1);
maximum = 0;
for k = 1 : n
for i = 1 : n
if abs(A(k,i)) >= maximum
maximum = A(k,i);
end
A(k,i) = A(k,i)/maximum;
end
end
A
My algorithm is not giving me the right matrix. Can you help me please?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Statics and Dynamics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!