Re: MuPad 3.0 extraction of individual eigenvectors
From: Ralf Hillebrand (tonner_at_mupad.de)
Date: 11/11/04
- Next message: Marcel Schuster: "Maxima: How to plot "numerically" defined function?"
- Previous message: Kartik R IIM: "Improve DI, Math scores today- CrackMATH from IIM alumni"
- In reply to: Brad Cooper: "MuPad 3.0 extraction of individual eigenvectors"
- Next in thread: John O'Flaherty: "Re: MuPad 3.0 extraction of individual eigenvectors"
- Reply: John O'Flaherty: "Re: MuPad 3.0 extraction of individual eigenvectors"
- Messages sorted by: [ date ] [ thread ]
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)
*---*
- Next message: Marcel Schuster: "Maxima: How to plot "numerically" defined function?"
- Previous message: Kartik R IIM: "Improve DI, Math scores today- CrackMATH from IIM alumni"
- In reply to: Brad Cooper: "MuPad 3.0 extraction of individual eigenvectors"
- Next in thread: John O'Flaherty: "Re: MuPad 3.0 extraction of individual eigenvectors"
- Reply: John O'Flaherty: "Re: MuPad 3.0 extraction of individual eigenvectors"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|