Problem 4.2 Goal: Determine the tension force when the height of the cable is ab
ID: 2074747 • Letter: P
Question
Problem 4.2 Goal: Determine the tension force when the height of the cable is above S0 m or below 15 m. The height of the cable y (m) can be defined as a function of the distance x with the following equation: y =-cost where TA is the tension force at point A (N) w is the weight along the cable per unit length (12 N/m) x is the distance along the cable (60 m) yo is the minimum height of the cable (4 m) Write a script or function (your choice) to complete the following tasks: a) Use the appropriate input mechanism to allow the user to input a vector of tension force TA (N) values. Your code should be flexible to handle a vector with any number of values (e.g., 3, 5, 20, b) c) Define variables for the constants defined above For ALL force values, calculate the height of the cable y (m). NOTE:Calculate the hyperbolic cosine in radians. For EACH force value, if the height of the cable y is greater than 50 m or less than 15 m use the appropriate output mechanism to output a message describing the condtion met and the tension force and height. Output only the values that meet the condition described d) Test Case 1: Test the code with a tension force TA vector with values between 500 and 3000 N. You can pick the number of values in the vector Check your answer with the solution below: or TA -500 N, y-55.2005 m For T-3000 N, y = 11.2346 m Page 2 of4Explanation / Answer
Below is the reqiured code.
--------------------------------------------------------------
clc;clear all;
y=55.2005;
T_A=500;
% y=input('Height of Cable [m] If want to enter multiple values use square brackets and values seprated by comma eg.[20,330,40]: ');
T_A=input('Tesnion in cable [N] If want to enter multiple values use square brackets and values seprated by comma eg.[20,330,40]: ');
w=12;
x=60;
y_0=4;
y=(T_A/w).*cosh(w.*x./T_A)+y_0-(T_A/w);
if y>=50
fprintf(' Rope Height is too high which is: %f',y)
elseif y<=15
fprintf(' Rope Height is too low which is: %f',y)
else
fprintf(' The rope height is %f: ',y)
end
-------------------------------------------------------------------------------
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.