MathGroup Archive 2001

[Date Index] [Thread Index] [Author Index]

Search the Archive

List Manipulation

  • To: mathgroup at
  • Subject: [mg31538] List Manipulation
  • From: woodward at (Jonathan Woodward)
  • Date: Fri, 9 Nov 2001 06:13:52 -0500 (EST)
  • Approved: Steven M. Christensen <>, Moderator
  • Sender: owner-wri-mathgroup at

I am a relatively new user to Mathematica with virutally no
programming experience and need help with a problem:

Given the following hypothetical eigensystem, a "list of lists" which
has the eigenvalues (A,B,C,D) associated with their corresponding
eigenvectors ({0,0,0,a},{b,0,0,d},{-a,-b,0,0},{c,0,0,-c}):


where the list contains zeros, symbolic expressions, and numbers.  
The actual system I have is the eigensystem of a 32x32 symbolic matrix
where the vector components seem to take up hundreds of pages and 
are therefore almost useless to me.  However, I am interested in the 
position of the zero and nonzero components only, not their actual

So what I want to do is transform the list into another more
useful list in the following way:

I do not want to change the eigenvalues but want to convert all
components in such a way that I have a list of zeros, ones, and
negative ones.
In other words, divide each eigenvector component by its absolute
value, except for the zeros, to create a new list that might now look


This way I can greatly simplify my problem while keeping the position
of the
zero and nonzero elements of the components unchanged.

How would I write a code in Mathematica to accomplish this?  In
how would do I tell the program to scan through this list, doing
to the eigenvalues, but look through the eigenvectors, check to see if
are nonzero (if zero, do nothing) and divide each nonzero component by
absolute value, and return a new list.  I don't want to break the list
and operate just on the vector components themselves because I want to
preserve the eigenvalue-eigenvector association.  Also, I need to be
able to tell
the program that symbols of the type {x} are positive and {-x} are
otherwise I might have a list returned like:


which is not simplified to what I need.

Any help would be greatly appreciated.


Jonathan Woodward

  • Prev by Date: Re: Complex Number Simultaneous Equation 2 Unknowns
  • Next by Date: Re: webMathematica
  • Previous by thread: Print value of a variable in a text cell
  • Next by thread: Re: List Manipulation