Question: complete the code: function project _ 4 ( ) % PROJECT _ 4 project _ 4 ( ) calculates the resultant force acting at a

complete the code:
function project_4()
% PROJECT_4 project_4()calculates the resultant force acting at a point.
%
% All multiplications, divisions, and exponentiations must use the
% dot operator.
%
% All code should be tabbed in once (as the template shows) and aligned
%
%
% Name:
% Date:
% CMPSC 200
%
%
%
% Header Information
fprintf('Name: %s
', 'Your name');
fprintf('Class:CMPSC 200
');
fprintf('Date: %s
', 'date');
fprintf('
')
% Description of the program
fprintf('');
fprintf('
')
% Have the user enter the three forces that are acting on the beam
% and the angle for each one
% that each one makes - the first one is done
F1= input('Enter the first force: ');
A = input('Enter the angle at which the force acts on the beam: ');
% You now have to repeat this for F2 with angle B, and F3 with angle C
% Decompose each force into its x and y direction components
% There will be six calculatons - two for each force
% As an example
F1x = F1.* cosd(A)
% Add the three x direction forces - this sum is the resultant in
% the x direction - call the variable FRx
% Add the three y direction forces - this sum is the resultant in
% the y direction - call the variable FRy
% Calculate the resultant force using the appropriate formula - Call
% this variable FR
% Calculate the angle of the resultant force using the inverse
% tangent (atand(...))- this is D
% Print the results using fprintf so that the data is formatted to two
% decimal places and are aligned on their decimal points
% This will include the entered force and the angle, and the x and y
% components for the force
% Print so that the first force is on the first row, the second force
% is on the second row and the third force is on the third
% The resultant force will be printed on the fourth row
end

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 Programming Questions!