Makeindex Sort bug?
simcacl
If mywave is (I copied an example found in a previous post)
1
3
5
2
4
the command
Duplicate mywave, index
MakeIndex mywave, index
Should create the index wave
0
2
4
1
3
but I get
0
3
1
4
2
What am I doing wrong?
How can I sort mywave with index (when it is corrent)?
Thanks
Simone
Decoding the index wave you got, one obtains
mywave[0]=1
mywave[3]=2
mywave[1]=3
mywave[4]=4
mywave[2]=5
How do you get the "should" order? Probably there is a small error in reasoning.
For sorting, have a look at
displayhelptopic "IndexSort"
anddisplayhelptopic "Sorting"
HJ
August 5, 2015 at 05:28 am - Permalink
0
3
1
4
2
instead of
0
2
4
1
3
as you said
August 5, 2015 at 05:32 am - Permalink
To sort mywave, you can use indexsort.
print mywave
produces mywave[0]= {1,2,3,4,5}
August 5, 2015 at 05:44 am - Permalink