Re: Re: RE: Comparison between Mathematica and other
- To: mathgroup at smc.vnet.net
- Subject: [mg92547] Re: [mg92537] Re: [mg92527] RE: [mg92378] Comparison between Mathematica and other
- From: "peter lindsay" <pl.0 at me.com>
- Date: Sat, 4 Oct 2008 06:17:14 -0400 (EDT)
- References: <200809301133.HAA21932@smc.vnet.net>
I agree. The object is to persuade people how accessible Mathematica is, not how incredibly learned and expert the users need to be. Peter 2008/10/3 Murray Eisenberg <murray at math.umass.edu> > I'd exercise caution before presenting such an example to people whom > you're trying to convince to turn to Mathematica. all the vertical > strokes, including those in the brackets, make this look like a jumble > of incomprehensible symbols. The effect could be precisely the opposite > of what you intend. > > Ingolf Dahl wrote: > > > I do not know how this is example is interesting or how it is done in > other > > systems, but once, 14 years back, it convinced me that I should use > > Mathematica for a specific problem. I wanted to sort the eigenvectors of > a > > real matrix according to decreasing size of the real part of the > > eigenvalues. For complex eigenvalue pairs I wanted the eigenvalue with > > positive imaginary part sorted first. I just wanted to specify the > sorting > > rule, and did not feel for writing the sorting algorithm from scratch. > This > > is how I solved it in Mathematica > > > > Transpose[ > > Sort[Transpose[Eigensystem[RandomReal[{-1, 1}, {6, 6}]]], > > > > Re[#2[[1]]] < Re[#1[[1]]] || > > Re[#2[[1]]] == Re[#1[[1]]] && Im[#2[[1]]] < Im[#1[[1]]] &]] > > > > I think this also is a good example of the use of functional programming, > > and it helped me to get in to it. > > In Mathematica we are thus able to sort any kind of "objects" with any > kind > > of sorting criteria, thanks to the generality of the language. > > -- > Murray Eisenberg murray at math.umass.edu > Mathematics & Statistics Dept. > Lederle Graduate Research Tower phone 413 549-1020 (H) > University of Massachusetts 413 545-2859 (W) > 710 North Pleasant Street fax 413 545-1801 > Amherst, MA 01003-9305 > >
- Follow-Ups:
- RE: RE: Comparison between Mathematica and other
- From: "Ingolf Dahl" <ingolf.dahl@telia.com>
- RE: RE: Comparison between Mathematica and other