Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribedPlease 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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle 11G SQL

Authors: Joan Casteel

2nd Edition

1133947360, 978-1133947363

More Books

Students also viewed these Databases questions