[Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?
Fahreddın Basegmez
mangabasi at gmail.com
Tue Dec 20 22:30:46 EST 2011
I think I am interested in the non-normalized eigenvectors not the
un-normalized ones. Once the eig function computes the generalized
eigenvectors I would like to use them as they are.
I would think this would be a common request since the normal-mode
frequency response is used in many different fields like chemical and
biomolecular sciences as well as engineering and physics. Mathematically
there may be no difference between the normalized and non-normalized
eigenvectors but physically there is. In my case those values represent
deflections. Advantage of the normal-modes is you can apply damping in
each direction independent of each other. Amount of damping we apply may
be dependent on those deflections so I would need to use the non-normalized
results.
On Tue, Dec 20, 2011 at 10:15 PM, Olivier Delalleau <shish at keba.be> wrote:
> What I don't get is that "un-normalized" eigenvectors can be pretty much
> anything. If you care about the specific output of Matlab / Octave, it
> means you understand the particular "un-normalization" that these programs
> use. In that case you should be able to recover it from the normalized
> output from numpy.
>
>
> -=- Olivier
>
> 2011/12/20 Fahreddın Basegmez <mangabasi at gmail.com>
>
>> I don't think I can do that. I can go to the normalized results but not
>> the other way.
>>
>>
>> On Tue, Dec 20, 2011 at 9:45 PM, Olivier Delalleau <shish at keba.be> wrote:
>>
>>> Hmm, sorry, I don't see any obvious logic that would explain how Octave
>>> obtains this result, although of course there is probably some logic...
>>>
>>> Anyway, since you seem to know what you want, can't you obtain the same
>>> result by doing whatever un-normalizing operation you are after?
>>>
>>>
>>> -=- Olivier
>>>
>>> 2011/12/20 Fahreddın Basegmez <mangabasi at gmail.com>
>>>
>>>> I should include the scipy response too I guess.
>>>>
>>>>
>>>> scipy.linalg.eig(STIFM, MASSM)
>>>> (array([ 3937.15984097+0.j, 3937.15984097+0.j, 3937.15984097+0.j,
>>>> 3923.07692308+0.j, 3923.07692308+0.j, 7846.15384615+0.j]),
>>>> array([[ 1., 0., 0., 0., 0., 0.],
>>>> [ 0., 1., 0., 0., 0., 0.],
>>>> [ 0., 0., 1., 0., 0., 0.],
>>>> [ 0., 0., 0., 1., 0., 0.],
>>>> [ 0., 0., 0., 0., 1., 0.],
>>>> [ 0., 0., 0., 0., 0., 1.]]))
>>>>
>>>> On Tue, Dec 20, 2011 at 9:14 PM, Fahreddın Basegmez <
>>>> mangabasi at gmail.com> wrote:
>>>>
>>>>> If I can get the same response as Matlab I would be all set.
>>>>>
>>>>>
>>>>> Octave results
>>>>>
>>>>> >> STIFM
>>>>> STIFM =
>>>>>
>>>>> Diagonal Matrix
>>>>>
>>>>> 1020 0 0 0 0 0
>>>>> 0 1020 0 0 0 0
>>>>> 0 0 1020 0 0 0
>>>>> 0 0 0 102000 0 0
>>>>> 0 0 0 0 102000 0
>>>>> 0 0 0 0 0 204000
>>>>>
>>>>> >> MASSM
>>>>> MASSM =
>>>>>
>>>>> Diagonal Matrix
>>>>>
>>>>> 0.25907 0 0 0 0 0
>>>>> 0 0.25907 0 0 0 0
>>>>> 0 0 0.25907 0 0 0
>>>>> 0 0 0 26.00000 0 0
>>>>> 0 0 0 0 26.00000 0
>>>>> 0 0 0 0 0 26.00000
>>>>>
>>>>> >> [a, b] = eig(STIFM, MASSM)
>>>>> a =
>>>>>
>>>>> 0.00000 0.00000 0.00000 1.96468 0.00000 0.00000
>>>>> 0.00000 0.00000 0.00000 0.00000 1.96468 0.00000
>>>>> 0.00000 0.00000 1.96468 0.00000 0.00000 0.00000
>>>>> 0.19612 0.00000 0.00000 0.00000 0.00000 0.00000
>>>>> 0.00000 0.19612 0.00000 0.00000 0.00000 0.00000
>>>>> 0.00000 0.00000 0.00000 0.00000 0.00000 0.19612
>>>>>
>>>>> b =
>>>>>
>>>>> Diagonal Matrix
>>>>>
>>>>> 3923.1 0 0 0 0 0
>>>>> 0 3923.1 0 0 0 0
>>>>> 0 0 3937.2 0 0 0
>>>>> 0 0 0 3937.2 0 0
>>>>> 0 0 0 0 3937.2 0
>>>>> 0 0 0 0 0 7846.2
>>>>>
>>>>>
>>>>> Numpy Results
>>>>>
>>>>> >>> STIFM
>>>>> array([[ 1020., 0., 0., 0., 0., 0.],
>>>>> [ 0., 1020., 0., 0., 0., 0.],
>>>>> [ 0., 0., 1020., 0., 0., 0.],
>>>>> [ 0., 0., 0., 102000., 0., 0.],
>>>>> [ 0., 0., 0., 0., 102000., 0.],
>>>>> [ 0., 0., 0., 0., 0., 204000.]])
>>>>>
>>>>> >>> MASSM
>>>>>
>>>>> array([[ 0.25907, 0. , 0. , 0. , 0. , 0.
>>>>> ],
>>>>> [ 0. , 0.25907, 0. , 0. , 0. , 0.
>>>>> ],
>>>>> [ 0. , 0. , 0.25907, 0. , 0. , 0.
>>>>> ],
>>>>> [ 0. , 0. , 0. , 26. , 0. , 0.
>>>>> ],
>>>>> [ 0. , 0. , 0. , 0. , 26. , 0.
>>>>> ],
>>>>> [ 0. , 0. , 0. , 0. , 0. , 26.
>>>>> ]])
>>>>>
>>>>> >>> a, b = linalg.eig(dot( linalg.pinv(MASSM), STIFM))
>>>>>
>>>>> >>> a
>>>>>
>>>>> array([ 3937.15984097, 3937.15984097, 3937.15984097, 3923.07692308,
>>>>> 3923.07692308, 7846.15384615])
>>>>>
>>>>> >>> b
>>>>>
>>>>> array([[ 1., 0., 0., 0., 0., 0.],
>>>>> [ 0., 1., 0., 0., 0., 0.],
>>>>> [ 0., 0., 1., 0., 0., 0.],
>>>>> [ 0., 0., 0., 1., 0., 0.],
>>>>> [ 0., 0., 0., 0., 1., 0.],
>>>>> [ 0., 0., 0., 0., 0., 1.]])
>>>>>
>>>>> On Tue, Dec 20, 2011 at 8:40 PM, Olivier Delalleau <shish at keba.be>wrote:
>>>>>
>>>>>> Hmm... ok ;) (sorry, I can't follow you there)
>>>>>>
>>>>>> Anyway, what kind of non-normalization are you after? I looked at the
>>>>>> doc for Matlab and it just says eigenvectors are not normalized, without
>>>>>> additional details... so it looks like it could be anything.
>>>>>>
>>>>>>
>>>>>> -=- Olivier
>>>>>>
>>>>>> 2011/12/20 Fahreddın Basegmez <mangabasi at gmail.com>
>>>>>>
>>>>>>> I am computing normal-mode frequency response of a mass-spring
>>>>>>> system. The algorithm I am using requires it.
>>>>>>>
>>>>>>> On Tue, Dec 20, 2011 at 8:10 PM, Olivier Delalleau <shish at keba.be>wrote:
>>>>>>>
>>>>>>>> I'm probably missing something, but... Why would you want
>>>>>>>> non-normalized eigenvectors?
>>>>>>>>
>>>>>>>> -=- Olivier
>>>>>>>>
>>>>>>>>
>>>>>>>> 2011/12/20 Fahreddın Basegmez <mangabasi at gmail.com>
>>>>>>>>
>>>>>>>>> Howdy,
>>>>>>>>>
>>>>>>>>> Is it possible to get non-normalized eigenvectors from
>>>>>>>>> scipy.linalg.eig(a, b)? Preferably just by using numpy.
>>>>>>>>>
>>>>>>>>> BTW, Matlab/Octave provides this with its eig(a, b) function but I
>>>>>>>>> would like to use numpy for obvious reasons.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> Fahri
>>>>>>>>>
>>>>>>>>
>>>>>> _______________________________________________
>>>>>> NumPy-Discussion mailing list
>>>>>> NumPy-Discussion at scipy.org
>>>>>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>>>>>
>>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> NumPy-Discussion mailing list
>>>> NumPy-Discussion at scipy.org
>>>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>>>
>>>>
>>>
>>> _______________________________________________
>>> NumPy-Discussion mailing list
>>> NumPy-Discussion at scipy.org
>>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>>
>>>
>>
>> _______________________________________________
>> NumPy-Discussion mailing list
>> NumPy-Discussion at scipy.org
>> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>>
>>
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20111220/f3636df0/attachment.html>
More information about the NumPy-Discussion
mailing list