Matrix method of structural analysis