% This code is for solving truss problem
% bs bo Fs matrices are for problem 4.21 (vaidyanathan book, page 287)
% bs=[0 -1.333 -1 1.666 0 0;]' 
%bo=[.75 1 .75 -1.25 -1.25 1]' 
%Fs=[80]

bs=[0 -1.944 1 0 1.667]'
bo=[-1.166 -1.166 0.6 .6 2]'
Fs=[60]


AE=sym('AE','real')
alpha=1/AE*[5.83 0 0 0 0; 0 5.83 0 0 0; 0 0 3 0 0; 0 0 0 3 0; 0 0 0 0 5]
a22=bo' *alpha*bo
a21=double(bo') * alpha*bs
Fo=-inv(a22)*a21*Fs
P=double([ bs bo]*[Fs;Fo])

