TP-probabilites/TP3/matrice_inertie.m
2023-06-10 21:01:20 +02:00

13 lines
333 B
Matlab

function [x_bar, y_bar, M] = matrice_inertie(E_x, E_y, G_norme)
PI = sum(G_norme);
x_bar = (G_norme.'*E_x)/PI;
y_bar = (G_norme.'*E_y)/PI;
M = [ (G_norme'*(E_x-x_bar).^2)/PI, (G_norme'*((E_x-x_bar).*(E_y-y_bar)))/PI
(G_norme'*((E_x-x_bar).*(E_y-y_bar)))/PI, (G_norme'*(E_y-y_bar).^2)/PI ];
end