Gmail - Free Chegg Answer From TechLaCarte

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

1/23/2021 Gmail - Free Chegg Answer from TechLaCarte

EZ Syafiq <wansyafiq06@gmail.com>

Free Chegg Answer from TechLaCarte


Learning Hub <learning@techlacarte.net> Sat, Jan 23, 2021 at 3:07 AM
To: "wansyafiq06@gmail.com" <wansyafiq06@gmail.com>

Welcome to the family of TechLaCarte, Recently you've asked for Unblur this Chegg Question on our website:

https://www.chegg.com/homework-help/questions-and-answers/301-beam-ab-subjected-several-vertical-forces-shown-write-
computer-program-used-determine--q63299547

Please find your Answer below (or) in the attached Image / Document!

Question:

Please write a program in matlab. Please prompt the user for inputs. Thank you!

Expert Answer
https://mail.google.com/mail/u/0?ik=49c3336e67&view=pt&search=all&permmsgid=msg-f%3A1689615010569146837&simpl=msg-f%3A1689615… 1/3
1/23/2021 Gmail - Free Chegg Answer from TechLaCarte

Matlab code is given below:

% This code calculates the Magnitude of resultant of forces and


% distance at which resultant acts
clear all;
n = input('Enter the number of forces acting on the beam: ');
i = 1;
while i<=n
F(i) = input('\nEnter magnitude of force with sign convention: ');
L(i) = input('\nEnter the distance of force from left hand side support: ');
i = i+1;
end
resultant =0; x = 0;
j = 1;
while j <= n
resultant = resultant + F(j); % Resulant of forces
x = (x + F(j)*L(j)); % Product of force and distance from Left hand side
j = j+1;
end
xc = x/resultant; % Defining distance to point C
fprintf('\nResultant of forces is:%0.2f \n',resultant)

fprintf('\nDistnace of forces from left hand side is:%0.2f \n',xc)

Output of the above code is as given below:

>> Resultant_of_force
Enter the number of forces acting on the beam: 3

Enter magnitude of force with sign convention: 150.5

Enter the distance of force from left hand side support: 10

Enter magnitude of force with sign convention: 200

Enter the distance of force from left hand side support: 12

Enter magnitude of force with sign convention: 198

Enter the distance of force from left hand side support: 15

Resultant of forces is:548.50

Distnace of forces from left hand side is:12.53


>>

Screenshot of the code is as given below:

https://mail.google.com/mail/u/0?ik=49c3336e67&view=pt&search=all&permmsgid=msg-f%3A1689615010569146837&simpl=msg-f%3A1689615… 2/3
1/23/2021 Gmail - Free Chegg Answer from TechLaCarte

[Quoted text hidden]

https://mail.google.com/mail/u/0?ik=49c3336e67&view=pt&search=all&permmsgid=msg-f%3A1689615010569146837&simpl=msg-f%3A1689615… 3/3

You might also like