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."