Clear Filters
Clear Filters

How to calculate the field at centroid point of a triangle based on the field at vertices?

1 view (last 30 days)
consider the vertices of a triangle in space and their fields values are given, and the centroid point of this triangle is calculated. Now the question is to calculate the field at centroid point?
v1_x = -1.77; % X coordinates of first vertex
v1_y = 0.74; % Y coordinates of first vertex
v1_z = 0.3; % Z coordinates of first vertex
v2_x = -1.6;
v2_y = -0.37;
v2_z = -1.04;
v3_x = -1.22;
v3_y = -1.47;
v3_z = -0.36;
B1_x = -7.198019341229631e-05; % x component of field in first vertex
B1_y = 3.007987132556276e-05; % y component of field in first vertex
B1_z = -1.608955608656014e-04; % z component of field in first vertex
B2_x = 2.249779211760113e-04;
B2_y = 5.204527749929917e-05;
B2_z = -2.654042843567594e-05;
B3_x = 5.917880401483067e-05;
B3_y = 7.141430458825743e-05;
B3_z = -1.551403553959796e-04;
x_centroid = mean([v1_x; v2_x; v3_x]);
y_centroid = mean([v1_y; v2_y; v3_y]);
z_centroid = mean([v1_z; v2_z; v3_z]);

Answers (0)

Products


Release

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!