Re: MuPad 3.0 extraction of individual eigenvectors

From: Ralf Hillebrand (tonner_at_mupad.de)
Date: 11/11/04


Date: Thu, 11 Nov 2004 10:05:50 +0100

Hi Brad,

Brad Cooper wrote:
> In MuPad 3.0 I can find eigenvectors as follows:
>
> A := matrix([[1, 1, 1], [1, 1, 1], [1, 1, 1]]):
> S := linalg::eigenvectors(A);
>
> I now want to extract the eigenvectors from S
> to use linalg::orthog(S) to orthogonalise these
> eigenvectors.

Torsten provided a solution in his posting, here is a less
verbose one.

Use map with op to extract the 3rd operands of the resulting
list:

>> map(S, op, 3) // or map(S, x -> op(x, 3))

                -- -- +- -+ +- -+ -- -- +- -+ -- --
                | | | -1 | | -1 | | | | 1 | | |
                | | | | | | | | | | | |
                | | | 1 |, | 0 | |, | | 1 | | |
                | | | | | | | | | | | |
                | | | 0 | | 1 | | | | 1 | | |
                -- -- +- -+ +- -+ -- -- +- -+ -- --

And since you want a flat list of vectors another op will do.
The command below is equivalent to 'map(S, x -> op(op(x, 3)))'
but even shorter and more efficient:

>> map(S, op@op, 3)

                      -- +- -+ +- -+ +- -+ --
                      | | -1 | | -1 | | 1 | |
                      | | | | | | | |
                      | | 1 |, | 0 |, | 1 | |
                      | | | | | | | |
                      | | 0 | | 1 | | 1 | |
                      -- +- -+ +- -+ +- -+ --

This is a valid input for linalg::orthog:

>> linalg::orthog(map(S, op@op, 3))

                     -- +- -+ +- -+ +- -+ --
                     | | -1 | | -1/2 | | 1 | |
                     | | | | | | | |
                     | | 1 |, | -1/2 |, | 1 | |
                     | | | | | | | |
                     | | 0 | | 1 | | 1 | |
                     -- +- -+ +- -+ +- -+ --

> I have found the problem I usually have with MuPad
> is taking the output from a command and making further
> use of that output as input to another command. Just
> a general observation.

Thats a point. If you find such problems, please tell us.
Our bug tracking system (http://www.mupad.de/bugs.shtml) is
not only for there for sending bug reports, but also for making
suggestions for improvements.

We can't fix problems that we don't know of. So, please help
us to improve MuPAD by providing suggestions for improvements.
A note about problems you find will do, too. Maybe we find a
solution. I have just added a suggestion for this problem under
the bug number 1542.

Cheers,
        Ralf

-- 
     *---*         MuPAD -- The Open Computer Algebra System
    *---*|
    |*--|*             Ralf Hillebrand (tonner@mupad.de)
    *---*


Relevant Pages

  • Re: MuPad 3.0 extraction of individual eigenvectors
    ... >> I now want to extract the eigenvectors from S ... >> use of that output as input to another command. ... > not only for there for sending bug reports, ...
    (sci.math.symbolic)
  • Re: MuPad 3.0 extraction of individual eigenvectors
    ... > that case, the aforementioned use of op, map and indexing is still required. ... way of asking MuPAD “if I wanted to extract this, ... > something with it i.e. feed it into another command. ... general not be eigenvectors any longer: ...
    (sci.math.symbolic)
  • Re: MuPad 3.0 extraction of individual eigenvectors
    ... >I now want to extract the eigenvectors from S ... experienced with the standard data types of MuPAD. ... its algebraic multiplicity and a basis for the eigenspace of. ...
    (sci.math.symbolic)
  • Re: Eigenvector extraction
    ... > I am trying to extract the eigenvectors corresponding to the k smallest ... > eigenvectors simultaneously, I am not able to increase k beyond a certain ... the largest eignvalues and there corresponding eignvectors. ... that probably won't work is to invert the matrix and then find the ...
    (comp.soft-sys.matlab)
  • Eigenvector extraction
    ... I am trying to extract the eigenvectors corresponding to the k smallest ... magnitude eigenvalues of a large and sparse matrix for some ... First I extract the first k/2 eigenvectors and save them to the disk, ...
    (comp.soft-sys.matlab)

Quantcast