## eigenvals cmd

Messages in english

compsystems
Messages : 519
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

### eigenvals cmd

Hello, BP, the result of eigenvals(A) must be contained between [ ] so that then can operate as a single object

A:=[[1,2],[3,4]]

eigenvals(A) [enter] returns (sqrt(33)+5)/2, (-(sqrt(33))+5)/2

=> [ (sqrt(33)+5)/2,(-(sqrt(33))+5)/2 ]

///
Something similar
When a group of objects is returned, please, after [copy] to enclose them as a list of objects
iquo(23,13); irem(23,13) [enter] returns 1, 10
[copy] then [paste]
list[ 1,10 ] to then be able to operate as a set of objects
list[ 1,10 ]*2 => [ 2,20 ]

jordan(A) [enter] returns [[sqrt(33)-3,-(sqrt(33))-3],[6,6]], [[(sqrt(33)+5)/2,0],[0,(-(sqrt(33))+5)/2]]
[copy] then [paste]
list[ [[sqrt(33)-3,-(sqrt(33))-3],[6,6]], [[(sqrt(33)+5)/2,0],[0,(-(sqrt(33))+5)/2]] ]

list[ [[sqrt(33)-3,-(sqrt(33))-3],[6,6]], [[(sqrt(33)+5)/2,0],[0,(-(sqrt(33))+5)/2]] ][1] => [[(sqrt(33)+5)/2,0],[0,(-(sqrt(33))+5)/2]]
list[ [[sqrt(33)-3,-(sqrt(33))-3],[6,6]], [[(sqrt(33)+5)/2,0],[0,(-(sqrt(33))+5)/2]] ][0] => [[sqrt(33)-3,-(sqrt(33))-3],[6,6]]

parisse
Messages : 5112
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

### Re: eigenvals cmd

eigenvals returns a sequence for compatibility reasons. You can run [eigenvals()] if you want a list

compsystems
Messages : 519
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

### Re: eigenvals cmd

ok, the problem with the format of the sequences is that when they are copied to a new input line, they can not be operated together.

a, b, c * d => a, b, (c * d)

some automatic solution

eigenvals ([[1,2], [3,4]]) => squ(val1, val2)
squ(val1, val2) * a => squ(val1*a, val2*a)