A vertical load W is applied 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 and E in terms of the magnitude of the applied load, W.

Use MATLAB to find the axial forces in the bar. Order the vector {X} of unknown axial forces in the bars as:

I have the answer,
X =

4.0000
2.0000
-2.8284
2.0000
-2.8284
-2.0000

but is incorrect, I obtain a message "The condition input argument must be a scalar logical."

The error message you encountered, "The condition input argument must be a scalar logical," suggests that there might be an issue with the logical condition you used in your MATLAB code. To better understand and resolve the problem, please provide the code you used in your MATLAB script for finding the axial forces in the bars. This will allow me to help you identify and correct any potential mistakes.

Without the specific MATLAB code, it is not possible to determine the exact cause of the error. However, here's a general step-by-step guide on how you can use the method of joints to find the axial forces in the bars and reactions at the supports:

1. Start by analyzing the joint(s) with the fewest unknowns. In this case, based on the given truss ABCDE and the applied load at joint C, you can start with joints A and E.

2. Isolate joint A and consider the equilibrium of forces acting on it. Resolve the forces into their axial (tensile or compressive) components along each bar. The sum of the forces in the x and y directions should be zero, as there is no vertical or horizontal movement at the supports.

3. Repeat the same process for joint E, considering the forces acting on it.

4. Move on to joint B and analyze the equilibrium of forces acting on it. This requires considering the forces in both the bars AB and BC. Again, resolve the forces into their axial components.

5. Proceed similarly for joint D, considering the forces acting on it and analyzing the equilibrium of forces.

6. Finally, consider joint C, where the load W is applied. Analyze the equilibrium of forces by considering the forces acting on it, including the load at C and the forces in the bars CD and CB.

By systematically applying the equations of equilibrium, you should be able to derive a set of simultaneous equations relating the unknown axial forces and reactions. Solving these equations will give you the values for the unknown axial forces in the bars and reactions at the supports.

Once you have obtained the set of equations representing the equilibrium conditions, you can use MATLAB to solve the system of equations and obtain the values of the unknown axial forces in the form of a vector {X}, as mentioned in the question.

Please provide the MATLAB code you used, and I can assist you further in troubleshooting the issue and obtaining the correct solution.