Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need to code vectors given in pdf file.. xcoords=[1 7 6 8 3 5 9 2 8 6 2 4 1];

ID: 1860564 • Letter: I

Question

I need to code vectors given in pdf file..

xcoords=[1 7 6 8 3 5 9 2 8 6 2 4 1];
ycoords=[8 3 7 5 9 1 3 6 8 8 2 3 4];
masses=[11 8 10 4 5 11 6 7 12 8 9 6 5];
plot(xcoords, ycoords, 'b-*')
xlabel('x-axis')
ylabel('y-axis')
title('center of mass')
xcenter=(mean(masses)*mean(xcoords))/mean(masses);
ycenter=(mean(masses)*mean(ycoords))/mean(masses);
hold on
plot(xcenter, ycenter, 'g--+')
hold off

Here is the code that I've done but can't figure it out further..

% coordinates and masses of particles xcoords =[1 7 6 8 3 5 9 2 8 6 2 4 1]; ycoords =[8 3 7 5 9 1 3 6 8 8 2 3 4]; masses = [11 8 10 4 5 11 6 7 12 8 9 6 5]; % calculate the center of mass of the particles xcenter = ycenter = % print center of mass coordinates using disp

Explanation / Answer

xcoords=[1 7 6 8 3 5 9 2 8 6 2 4 1];
ycoords=[8 3 7 5 9 1 3 6 8 8 2 3 4];
masses=[11 8 10 4 5 11 6 7 12 8 9 6 5];
plot(xcoords, ycoords, 'b-*')
xlabel('x-axis')
ylabel('y-axis')
title('center of mass')
xcenter=(mean(masses)*mean(xcoords))/mean(masses);
ycenter=(mean(masses)*mean(ycoords))/mean(masses);
hold on
plot(xcenter, ycenter, 'g--+')
hold off



p = [xcenter ycenter]


disp(p)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote