A weight W is supported by two cables anchored a distance D apart as shown in the figure below. For D, LAB, and LAC, the angles θ and ϕ can be calculated using the following equations based on the law of cosines and law of sines:
θ = cos^-1((D^2 + LAB^2 - LAC^2) / (2D * LAB))
ϕ = sin^-1((LAB * sin θ) / LAC)
From force analysis, the two equilibrium equations in the x and y directions are given as follows:
-TAB cos θ + TAC cos ϕ = 0
TAB sin θ + TAC sin ϕ = W
(a) Write a pseudo-code to find the tensile forces in each cable using the above equations with inputs D, W, LAB, and LAC.
(b) Write a user function, [T1, T2] = CalculateForce(D, W, L1, L2), to find the tensile forces in each cable. You can use matrix operations (inv or ) to solve the system of equations (2) in your code.
(c) With D = 6 m, LAB = 3 m, and W = 2000 N, we want to find TAB and TAC by changing LAC from 3.1 m to 4 m. Write a MATLAB code to plot a graph of TAB and TAC vs. LAC in one figure window with labels in x and y axes. Use a for-loop and subplot, xlabel, and ylabel commands with the user function written in (b).
(d) Load the data1.mat file and calculate TAB and TAC using the values of D, LAB, LAC, and W in the file.