| MATLAB Central > MATLAB Newsreader > Sorting Arrays |
|
|
|
Hi everyone, |
|
matlabn00b <kkemmerich@hotmail.com> wrote in message <1998266770.62444.1292434700329.JavaMail.root@gallium.mathforum.org>... |
|
|
|
I'm sorry, I forgot to mention that the code is supposed to work for any length vector. I don't understand why you set b to be zeros. Also I have never come across the term "idx" in Matlab and doing a quick google search didn't tell me either. Thanks for the quick response! |
|
matlabn00b <kkemmerich@hotmail.com> wrote in message <70596055.63024.1292441166858.JavaMail.root@gallium.mathforum.org>... |
|
The term _idx_ in Sean's code is a generic variable name, kinda like the term _done_ and _new_ in "your" code. |
|
matlabn00b wrote: |
|
Thank you guys so much for the help. If I wanted to input two arrays of equal length and sort it by the first array using the previous method and keep the "pairs" the same how would that work? Any hints or help? Thanks again. |
|
If you really wrote the code shown in your first post this second question should be a piece of cake. |
A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.
Anyone can tag a thread. Tags are public and visible to everyone.
