Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #10287
| From | Marco Lazzaretti <marco.lazzaretti82@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | vector ordering problem |
| Date | 2012-05-31 06:54 +0000 |
| Organization | Steven M. Christensen and Associates, Inc and MathTensor, Inc. |
| Message-ID | <jq74k3$qkn$1@smc.vnet.net> (permalink) |
Hi,
I have these two vectors, vector1 and vector2.
I need to have vector2 sorted by a positions vector, given by a
vector1.
e.g.
vector1 ={32,4,28,11,20}
position_vector1= Ordering[vector1]
position_vector1 = {5,1,4,2,3}
vector2 = {78,12,95,14,35}
requested output
{35,78,14,12,95}
that is, I have this position vector, as an output from another
calculation; then i need my input vector to be sorted as the position
vector says.
Obviously, my real input vector is quite bigger so i can't sort it
manually... I hope the small example can explain my problem better
than my words...
Back to comp.soft-sys.math.mathematica | Previous | Next — Next in thread | Find similar | Unroll thread
vector ordering problem Marco Lazzaretti <marco.lazzaretti82@gmail.com> - 2012-05-31 06:54 +0000 Re: vector ordering problem DC <b.gatessucks@gmail.com> - 2012-06-01 09:19 +0000 Re: vector ordering problem Ray Koopman <koopman@sfu.ca> - 2012-06-02 09:42 +0000
csiph-web