In [2]:
import numpy as np

In [38]:
muvec = np.array([3.15, 1.75, -6.39, -2.86, -6.75, -.54, -6.75, -5.26])/100
Onevec = np.ones([len(muvec)])
V = np.matrix([[0.001005,	0.001328,	-0.000579,	-0.000675,	0.000121,	0.000128,	-0.000445,	-0.000437],
               [0.001328,	0.007277,	-0.001307,	-0.000610,	-0.002237,	-0.000989,	0.001442,	-0.001535],
               [-0.000579,	-0.001307,	0.059852,	0.027588,	0.063497,	0.023036,	0.032967,	0.048039],
               [-0.000675,	-0.000610,	0.027588,	0.029609,	0.026572,	0.021465,	0.020697,	0.029854],
               [0.000121,	-0.002237,	0.063497,	0.026572,	0.102488,	0.042744,	0.039943,	0.065994],
               [0.000128,	-0.000989,	0.023036,	0.021465,	0.042744,	0.032056,	0.019881,	0.032235],
               [-0.000445,	0.001442,	0.032967,	0.020697,	0.039943,	0.019881,	0.028355,	0.035064],
               [-0.000437,	-0.001535,	0.048039,	0.029854,	0.065994,	0.032235,	0.035064,	0.079958]])

rf = .015

In [39]:
A = 2*V
A


Out[39]:
matrix([[ 0.00201 ,  0.002656, -0.001158, -0.00135 ,  0.000242,  0.000256,
         -0.00089 , -0.000874],
        [ 0.002656,  0.014554, -0.002614, -0.00122 , -0.004474, -0.001978,
          0.002884, -0.00307 ],
        [-0.001158, -0.002614,  0.119704,  0.055176,  0.126994,  0.046072,
          0.065934,  0.096078],
        [-0.00135 , -0.00122 ,  0.055176,  0.059218,  0.053144,  0.04293 ,
          0.041394,  0.059708],
        [ 0.000242, -0.004474,  0.126994,  0.053144,  0.204976,  0.085488,
          0.079886,  0.131988],
        [ 0.000256, -0.001978,  0.046072,  0.04293 ,  0.085488,  0.064112,
          0.039762,  0.06447 ],
        [-0.00089 ,  0.002884,  0.065934,  0.041394,  0.079886,  0.039762,
          0.05671 ,  0.070128],
        [-0.000874, -0.00307 ,  0.096078,  0.059708,  0.131988,  0.06447 ,
          0.070128,  0.159916]])

In [40]:
B = np.append(A, [muvec], axis=0)
B


Out[40]:
matrix([[ 0.00201 ,  0.002656, -0.001158, -0.00135 ,  0.000242,  0.000256,
         -0.00089 , -0.000874],
        [ 0.002656,  0.014554, -0.002614, -0.00122 , -0.004474, -0.001978,
          0.002884, -0.00307 ],
        [-0.001158, -0.002614,  0.119704,  0.055176,  0.126994,  0.046072,
          0.065934,  0.096078],
        [-0.00135 , -0.00122 ,  0.055176,  0.059218,  0.053144,  0.04293 ,
          0.041394,  0.059708],
        [ 0.000242, -0.004474,  0.126994,  0.053144,  0.204976,  0.085488,
          0.079886,  0.131988],
        [ 0.000256, -0.001978,  0.046072,  0.04293 ,  0.085488,  0.064112,
          0.039762,  0.06447 ],
        [-0.00089 ,  0.002884,  0.065934,  0.041394,  0.079886,  0.039762,
          0.05671 ,  0.070128],
        [-0.000874, -0.00307 ,  0.096078,  0.059708,  0.131988,  0.06447 ,
          0.070128,  0.159916],
        [ 0.0315  ,  0.0175  , -0.0639  , -0.0286  , -0.0675  , -0.0054  ,
         -0.0675  , -0.0526  ]])

In [41]:
C = np.append(B, [Onevec], axis=0)
C


Out[41]:
matrix([[  2.01000000e-03,   2.65600000e-03,  -1.15800000e-03,
          -1.35000000e-03,   2.42000000e-04,   2.56000000e-04,
          -8.90000000e-04,  -8.74000000e-04],
        [  2.65600000e-03,   1.45540000e-02,  -2.61400000e-03,
          -1.22000000e-03,  -4.47400000e-03,  -1.97800000e-03,
           2.88400000e-03,  -3.07000000e-03],
        [ -1.15800000e-03,  -2.61400000e-03,   1.19704000e-01,
           5.51760000e-02,   1.26994000e-01,   4.60720000e-02,
           6.59340000e-02,   9.60780000e-02],
        [ -1.35000000e-03,  -1.22000000e-03,   5.51760000e-02,
           5.92180000e-02,   5.31440000e-02,   4.29300000e-02,
           4.13940000e-02,   5.97080000e-02],
        [  2.42000000e-04,  -4.47400000e-03,   1.26994000e-01,
           5.31440000e-02,   2.04976000e-01,   8.54880000e-02,
           7.98860000e-02,   1.31988000e-01],
        [  2.56000000e-04,  -1.97800000e-03,   4.60720000e-02,
           4.29300000e-02,   8.54880000e-02,   6.41120000e-02,
           3.97620000e-02,   6.44700000e-02],
        [ -8.90000000e-04,   2.88400000e-03,   6.59340000e-02,
           4.13940000e-02,   7.98860000e-02,   3.97620000e-02,
           5.67100000e-02,   7.01280000e-02],
        [ -8.74000000e-04,  -3.07000000e-03,   9.60780000e-02,
           5.97080000e-02,   1.31988000e-01,   6.44700000e-02,
           7.01280000e-02,   1.59916000e-01],
        [  3.15000000e-02,   1.75000000e-02,  -6.39000000e-02,
          -2.86000000e-02,  -6.75000000e-02,  -5.40000000e-03,
          -6.75000000e-02,  -5.26000000e-02],
        [  1.00000000e+00,   1.00000000e+00,   1.00000000e+00,
           1.00000000e+00,   1.00000000e+00,   1.00000000e+00,
           1.00000000e+00,   1.00000000e+00]])

In [42]:
D = np.insert(C, 8, np.append(muvec, [0,0])*-1, axis=1)
D


Out[42]:
matrix([[  2.01000000e-03,   2.65600000e-03,  -1.15800000e-03,
          -1.35000000e-03,   2.42000000e-04,   2.56000000e-04,
          -8.90000000e-04,  -8.74000000e-04,  -3.15000000e-02],
        [  2.65600000e-03,   1.45540000e-02,  -2.61400000e-03,
          -1.22000000e-03,  -4.47400000e-03,  -1.97800000e-03,
           2.88400000e-03,  -3.07000000e-03,  -1.75000000e-02],
        [ -1.15800000e-03,  -2.61400000e-03,   1.19704000e-01,
           5.51760000e-02,   1.26994000e-01,   4.60720000e-02,
           6.59340000e-02,   9.60780000e-02,   6.39000000e-02],
        [ -1.35000000e-03,  -1.22000000e-03,   5.51760000e-02,
           5.92180000e-02,   5.31440000e-02,   4.29300000e-02,
           4.13940000e-02,   5.97080000e-02,   2.86000000e-02],
        [  2.42000000e-04,  -4.47400000e-03,   1.26994000e-01,
           5.31440000e-02,   2.04976000e-01,   8.54880000e-02,
           7.98860000e-02,   1.31988000e-01,   6.75000000e-02],
        [  2.56000000e-04,  -1.97800000e-03,   4.60720000e-02,
           4.29300000e-02,   8.54880000e-02,   6.41120000e-02,
           3.97620000e-02,   6.44700000e-02,   5.40000000e-03],
        [ -8.90000000e-04,   2.88400000e-03,   6.59340000e-02,
           4.13940000e-02,   7.98860000e-02,   3.97620000e-02,
           5.67100000e-02,   7.01280000e-02,   6.75000000e-02],
        [ -8.74000000e-04,  -3.07000000e-03,   9.60780000e-02,
           5.97080000e-02,   1.31988000e-01,   6.44700000e-02,
           7.01280000e-02,   1.59916000e-01,   5.26000000e-02],
        [  3.15000000e-02,   1.75000000e-02,  -6.39000000e-02,
          -2.86000000e-02,  -6.75000000e-02,  -5.40000000e-03,
          -6.75000000e-02,  -5.26000000e-02,  -0.00000000e+00],
        [  1.00000000e+00,   1.00000000e+00,   1.00000000e+00,
           1.00000000e+00,   1.00000000e+00,   1.00000000e+00,
           1.00000000e+00,   1.00000000e+00,  -0.00000000e+00]])

In [43]:
E = np.insert(D, 9, np.append(Onevec, [0,0])*-1, axis=1)
E


Out[43]:
matrix([[  2.01000000e-03,   2.65600000e-03,  -1.15800000e-03,
          -1.35000000e-03,   2.42000000e-04,   2.56000000e-04,
          -8.90000000e-04,  -8.74000000e-04,  -3.15000000e-02,
          -1.00000000e+00],
        [  2.65600000e-03,   1.45540000e-02,  -2.61400000e-03,
          -1.22000000e-03,  -4.47400000e-03,  -1.97800000e-03,
           2.88400000e-03,  -3.07000000e-03,  -1.75000000e-02,
          -1.00000000e+00],
        [ -1.15800000e-03,  -2.61400000e-03,   1.19704000e-01,
           5.51760000e-02,   1.26994000e-01,   4.60720000e-02,
           6.59340000e-02,   9.60780000e-02,   6.39000000e-02,
          -1.00000000e+00],
        [ -1.35000000e-03,  -1.22000000e-03,   5.51760000e-02,
           5.92180000e-02,   5.31440000e-02,   4.29300000e-02,
           4.13940000e-02,   5.97080000e-02,   2.86000000e-02,
          -1.00000000e+00],
        [  2.42000000e-04,  -4.47400000e-03,   1.26994000e-01,
           5.31440000e-02,   2.04976000e-01,   8.54880000e-02,
           7.98860000e-02,   1.31988000e-01,   6.75000000e-02,
          -1.00000000e+00],
        [  2.56000000e-04,  -1.97800000e-03,   4.60720000e-02,
           4.29300000e-02,   8.54880000e-02,   6.41120000e-02,
           3.97620000e-02,   6.44700000e-02,   5.40000000e-03,
          -1.00000000e+00],
        [ -8.90000000e-04,   2.88400000e-03,   6.59340000e-02,
           4.13940000e-02,   7.98860000e-02,   3.97620000e-02,
           5.67100000e-02,   7.01280000e-02,   6.75000000e-02,
          -1.00000000e+00],
        [ -8.74000000e-04,  -3.07000000e-03,   9.60780000e-02,
           5.97080000e-02,   1.31988000e-01,   6.44700000e-02,
           7.01280000e-02,   1.59916000e-01,   5.26000000e-02,
          -1.00000000e+00],
        [  3.15000000e-02,   1.75000000e-02,  -6.39000000e-02,
          -2.86000000e-02,  -6.75000000e-02,  -5.40000000e-03,
          -6.75000000e-02,  -5.26000000e-02,  -0.00000000e+00,
          -0.00000000e+00],
        [  1.00000000e+00,   1.00000000e+00,   1.00000000e+00,
           1.00000000e+00,   1.00000000e+00,   1.00000000e+00,
           1.00000000e+00,   1.00000000e+00,  -0.00000000e+00,
          -0.00000000e+00]])

In [44]:
b = np.matrix([0,0,0,0,0,0,0,0,.5825,1])
b


Out[44]:
matrix([[ 0.    ,  0.    ,  0.    ,  0.    ,  0.    ,  0.    ,  0.    ,
          0.    ,  0.5825,  1.    ]])

In [45]:
E.I * b.T


Out[45]:
matrix([[ 5.02194249],
        [-0.46149446],
        [ 2.18812577],
        [-1.49714406],
        [-1.41670399],
        [ 3.68882989],
        [-7.41886017],
        [ 0.89530453],
        [ 2.65369736],
        [-0.06881401]])

In [ ]: