Question: Please solve using matlab, the solution mentioned in the problem is under the function title. In Exercise 3, Problem 1, you calculated the total moment

Please solve using matlab, the solution mentioned in the problem is underPlease solve using matlab, the solution mentioned in the problem is under the function title.

In Exercise 3, Problem 1, you calculated the total moment of a set of forces. Copy your solution from that problem and enclose it in a function called moment_of_force that takes 3 MATLAB vectors (F, r, and theta in that order) as inputs, and returns the total moment as its output. Function C Reset MATLAB Documentation 1 F = randi([100, 1000), 1,5); 2 r = rand(1, 5); 3 theta = randi([0, 180], 1,5); 4 M=F.*r. *sind(theta) 5 total_moment=sum(M) Code to call your function C Reset 1 %In both of these test cases, the moments should sum to o, except for round-off error 2 3 M1 = moment_of_force([200, 235.3, 188.2, 58.8], [1.5, 2.55, 2.5, 2.5], [-90, 131.8, 180, -90]) 4 6 5 F = [196.2*sqrt(2), sqrt(39.2^2+549^2)]; r = [2.8, 1]; 7 theta = [225, atan2d(549, -39.2)]; 8 M2 = moment_of_force(F, r, theta)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!