A load W=2 kN is applied vertically to joint C of truss ABCDE as indicated. You will use the method of joints to obtain the axial forces in the bars and reactions at the supports A, E .

We start with the classification of the degrees of freedom as "free" or "constrained".

From the geometry of the truss, we see that we have:

Free DOF x and y at B, C, and D.

Constrained DOF x and y at A and E .

Question 1: Use MATLAB to find the axial forces in the bar.

Order the vector {X} of unknown axial forces in the bars as:

To use MATLAB to find the axial forces in the bars of the truss, you need to define the equilibrium equations for each joint of the truss.

1. Start by creating a system of equations based on the equilibrium conditions at each joint. Use the method of joints to analyze each joint separately.

2. Assign variables for the unknown axial forces in each bar. Let's assume the bars are labeled as follows: bar AB as BAR1, bar BC as BAR2, bar CD as BAR3, bar DE as BAR4.

3. Write the equilibrium equations for each joint. Considering joint B, for example, the equilibrium equations are:

ΣFx = 0: BAR1 - BAR2 * cos(θ1) = 0
ΣFy = 0: BAR2 * sin(θ1) - BAR3 * cos(θ2) = 0

Here, θ1 and θ2 are the angles of the bars relative to the horizontal axis.

4. Repeat this process for each joint (C and D) and include the applied load at joint C. For joint C, the equilibrium equations are:

ΣFx = 0: BAR3 * cos(θ2) - BAR4 * cos(θ3) = 0
ΣFy = 0: BAR3 * sin(θ2) + W - BAR4 * sin(θ3) = 0

5. Write the equilibrium equations for the constrained joints A and E. For joint A, the equilibrium equations are:

ΣFx = 0: BAR1 * cos(θ1) - RA = 0
ΣFy = 0: BAR1 * sin(θ1) = 0

For joint E, the equilibrium equations are:

ΣFx = 0: BAR4 * cos(θ3) - RE = 0
ΣFy = 0: BAR4 * sin(θ3) = 0

Here, RA and RE are the reactions at supports A and E, respectively.

6. Combine all the equations to form a system of linear equations in the form of [A]{X} = {B}, where [A] is the coefficient matrix, {X} is the vector of axial forces in the bars, and {B} is the vector of known values (including the applied load and the reactions).

7. Solve the system of equations using MATLAB's matrix algebra functions. Use the backslash operator (\) to solve for {X}. The solution will provide the axial forces in each bar.

Ensure that you have all the necessary inputs, such as the lengths and angles of the bars, before proceeding with the calculations in MATLAB.