Excellent, yes, this solution will work for me!
Thanks for your swift reply!

On Jan 15, 11:12 pm, Jason Grout <jason-s...@creativetrax.com> wrote:
> c mullan wrote:
> > Hi,
>
> > Suppose I compute the Jordan Normal Form of a matrix,
>
> > A.jordan_form()
>
> > Then in the output I can see that the block sizes are indicated (by
> > subdivide='True'), but I can't extract this information. I would like
> > a list of block sizes, (e.g. [2,2,1,1,1] for a 7x7 matrix).
>
> > I cannot figure out how to do this, any ideas?
>
> sage: a = matrix(ZZ,4,[1, 0, 0, 0, 0, 1, 0, 0, 1, -1, 1, 0, 1, -1, 1, 2])
> sage: b=a.jordan_form()
> sage: b
>
> [2|0 0|0]
> [-+---+-]
> [0|1 1|0]
> [0|0 1|0]
> [-+---+-]
> [0|0 0|1]
> sage: b.subdivisions
> ([0, 1, 3, 4], [0, 1, 3, 4])
>
> That will give you the indices of the subdivisions, for any subdivided
> matrix.  You can then calculate the jordan block sizes from that by
> subtracting each pair of numbers.
>
> Alternatively, maybe there could be something in the jordan form
> function that returns the jordan block sizes for each of the eigenvalues...
>
> Jason
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to