polocmoi81 a écrit:Merci beaucoup, mais ça reste compliqué pour moi.
J'ai pu trouver pour une fonction ax + b grace à cette video : https://www.youtube.com/watch?v=wEf7iy49PMQ
La méthode est-elle presque la même pour une fonction : ax^3 + bx² + cx + d ?
Merci
FOR i := 0 TO 3 BY 1 DO
MaxEl := ABS(A[i,i]);
MaxRaw := i;
FOR k := i+1 TO 3 BY 1 DO // Search for maximum in this column
IF ABS(A[k,i]) > MaxEl THEN
MaxEl := ABS(A[k,i]);
MaxRaw := k;
END_IF
END_FOR
FOR k := i TO 4 BY 1 DO // Swap maximum row with current row (column by column)
Temp := A[MaxRaw, k];
A[MaxRaw, k] := A[i,k];
A[i,k] := Temp;
END_FOR
FOR k := i+1 TO 3 BY 1 DO // Make all rows below this one 0 in current column
IF A[i,i]<>0 THEN C := -A[k,i]/A[i,i]; END_IF;
FOR j := i TO 4 BY 1 DO
IF i = j THEN
A[k,j] := 0;
ELSE
A[k,j] := A[k,j] + (C*A[i,j]);
END_IF
END_FOR
END_FOR
END_FOR
FOR i:= 3 TO 0 BY -1 DO // Solve equation Ax=b for an upper triangular matrix A
IF A[i,i] <> 0 THEN x[i] := A[i,4] / A[i,i]; END_IF
FOR k := i-1 TO 0 BY -1 DO
A[k,4] := A[k,4] - (A[k,i] * x[i]);
END_FOR
END_FOR
Utilisateurs parcourant ce forum : Aucun utilisateur enregistré et 30 invités
Tu pars déja ?
Identification
Pas encore inscrit ?
Ou identifiez-vous :