[Numpy-discussion] Getting non-normalized eigenvectors from generalized eigenvalue solution?
Fahreddın Basegmez
mangabasi at gmail.com
Tue Dec 20 22:05:06 EST 2011
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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20111220/181fba28/attachment.html>
More information about the NumPy-Discussion
mailing list