Function Mat_ProdPX(Angle As Double) As Variant
'M1M2 = P
'X2 = X'
'Initialisation
Dim Mat_X As Variant
Dim MatriceX2(3, 1) As Double
Dim MatIntX(3, 1) As Double
Dim P As Variant
Dim X As Variant
Dim i, j As Integer
'Détermination de la matrice X
Set cell = Cells(5, 8)
Do While cell <> ""
MatIntX(0, 0) = cell
MatIntX(1, 0) = cell.Offset(1, 0)
MatIntX(2, 0) = cell.Offset(2, 0)
Mat_X = MatIntX
'Calcule de X'=Pinv*X
P = Pinv(Angle)
X = Mat_X(Angle)
For i = 1 To 3
MatriceX2(i - 1, 0) = P(i, 1) * X(0, 0) + _
P(i, 2) * X(1, 0) + _
P(i, 3) * X(2, 0)
Cells(13 + i, 7 + cell) = MatriceX2(i - 1, 0)
Next i
Set cell = cell.Offset(0, 1)
Loop
End Function