Question

please use MATLAB

masses: (refer to P9.4, and use the fprintf command for the output of Mass center is located at .) 2. [20points] Using a dot

0 0
Add a comment Improve this question Transcribed image text
Answer #1
MATLAB Input

M = [10 3 7]; %Masses m1 m2 m3
S = sum(M);
X_c = [ 4 6 12]; % x centroid x1 x2 x3
Y_c = [4.5 15 10]; % y centroid y1 y2 y3
CM_X = dot(M,X_c)/S; % Mass Center X
CM_Y = dot(M,Y_c)/S; % Mass Center Y
fprintf('Mass Center is located  at (%.1f,%.1f)',CM_X,CM_Y)
MATLAB Output
Mass Center is located  at (7.1,8.0)
Add a comment
Know the answer?
Add Answer to:
please use MATLAB masses: (refer to P9.4, and use the fprintf command for the output of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • integers between 5 and 400 Use MATLAB command windows to create a vector with all a)...

    integers between 5 and 400 Use MATLAB command windows to create a vector with all a) Ans) "deconv" Write a function integerdivision to divide two polynomials function using the command b) d) Write m-file to find the roots of the following linear equation using MATLAB x5 +2x -5x3 +7x2+12x +200 Ans) Questions 2 cover CLO2:/10 a) Write the output of the following MATLAB code >> A = [2,4,10,13:16,3,7,18; 8,4,9,25:3,12,15,171 >> length (A) >> size (A)

  • Using Matlab. I can't seem to get the fprintf part to display the values in 2...

    Using Matlab. I can't seem to get the fprintf part to display the values in 2 columns. Could someone help me with that Before calculators were readily available (about 1974), students used tables to determine the values of mathematical functions like sine, cosine, and log. Create such a table for sine, using the following steps: • Create a vector of angle values from 0 to 27 in increments of T/10. • Calculate the sine of each of the angles, and...

  • 5.i) What will be the output of the script: for i-1:7 for j- 1:i fprintf(%d", j)...

    5.i) What will be the output of the script: for i-1:7 for j- 1:i fprintf(%d", j) end fprintf('\n') % start a new line. end 5 (i) For ax2 + bxc 0, the value of x is given by 2a Write a MATLAB function quadrasol () that will have three inputs ( a,b, and c) and two outputs corresponding to the solutions of the equation. It may be more compact if you defined another variable 'd' for the term inside the...

  • Please use matlab cars. Answer: Function file; Command Window: 5.4 Write a user-defined function that plots...

    Please use matlab cars. Answer: Function file; Command Window: 5.4 Write a user-defined function that plots a circle given the coordinates of the center and the radius. For the function name and arguments use circleplot(x,y,R). The input arguments are the and y coordinates of the center and the radius. Use linspace to generte the angle from 0 to π with 100 points. (Hint: the circle equation: x+Rcos and yy-yRsin 0.) This function has no output arguments. Plot the circle using...

  • Please use Matlab to solve and show your full codes Write a script file Ask the...

    Please use Matlab to solve and show your full codes Write a script file Ask the user to enter sides of a triangle: a, b, c Check to see if the sides are all greater than 0 If they are: Use the function (triangle) that you created in your last homework problem (HW#5 problemttF) to calculate the area. command Display the results on the screen using fprintf write the results to disk using the fprintf command. If any of the...

  • 4. (a) Three point masses are attached to a massless rigid rod. Mass m,-1.0 kg is...

    4. (a) Three point masses are attached to a massless rigid rod. Mass m,-1.0 kg is located at x = 1.0 cm, mass m2-2.0 kg at x = 2.0 cm and mass m,-3.0 kg at x-3.0 m. Find the center of mass of the system. (b) Find the center of mass of the four masses as below. mi 2.0 kg at point (1,2) cm; m 3.0 kg at point (2,-3) cm; m -4.0 kg at point (3,-4) cm and m...

  • Use MATLAB OR SCILAB TO PERFORM THE FOLLOWING MATRIX OPERATION Use MATLAB or Scilab to perform...

    Use MATLAB OR SCILAB TO PERFORM THE FOLLOWING MATRIX OPERATION Use MATLAB or Scilab to perform the following matrix operation 1 7 -2 3 10 91 5 -1 1) 2 51 13 7 -54 21 31 4 -15 2 9 6 18 -4 -2 31 Input: (copy and paste the MATLAB or Scilab command in the following box) Output: (copy and paste the output in the following box)

  • Use MATLAB to fit the to the following data, find the values of a, b, and...

    Use MATLAB to fit the to the following data, find the values of a, b, and c using least square method. Use fprintf command to write the values of a, b, c (no plot is needed, just the value of coefficients).Upload your MATLAB code and values of a, b, and c the box bellow. x = [-0.6 -0.4 -0.2 0 0.2 0.4 0.6] y = [0.956 -0.013 -1.01 -2.001 -2.99 -3.98 -4.97]

  • specify Output, please. 6. Create a MATLAB script to integrate the given function using the numerical...

    specify Output, please. 6. Create a MATLAB script to integrate the given function using the numerical scheme called Trapezoid's Rule. a. f(x)- xe* +3x1+2x-1 and find for with h 0.1, 0.01 and 0.001 Input: (copy and paste the MATLAB or Scilab command in the following box)

  • Need help with the following questions 1. Two point masses a mass a-6 Kg mass and...

    Need help with the following questions 1. Two point masses a mass a-6 Kg mass and mass b- 7 kg mass are located L- 5 meters apart. Calculate the moment of inertia about Axis b. (image not to scale) Axis a Axis b mg nNg 2. Two point masses a 6 Kg mass and an 18 kg mass are connected by a mass less rod 6 meters long. Calculate the distance of the center of mass from the 18 kg...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT