![](/profiles/wavemetrics/themes/wavemetrics/logo.png)
numerically sort wave list
![](/sites/default/files/styles/thumbnail/public/default_images/Artboard%201_1.png?itok=jeHOCIXy)
ali8
I have waves such as: wave001_411, wave002_411, ..., wave999_411. I want to sort the "Wave List".
I use:
#pragma rtGlobals=1 // Use modern global access method. #include <WindowBrowser> Function ali() String Vx_list = WaveList("dVdI*_Vx_1011", ";", "") Make/N=63 textwave Variable nwaves = ItemsInList(Vx_list) textwave=stringFromList(0,Vx_list) Edit textwave Sort textwave,textwave print textwave end
but I get an error, IGOR does not recognize stringFromList...And actually I am not sure if the above is what I need. All what I need is to sort Vx_list.
Is there any way to do this? i.e. to let IGOR sort based on the first number part in the file names?
instead.
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
August 13, 2013 at 05:05 pm - Permalink
Is this, anyway, I will need to convert the new text wave into a string. How to do that?
EDIT: Yes, /T solved the problem.
Now, how can I convert the text wave back to a String to use it in place of the unsorted list Vx_List ?
August 13, 2013 at 05:33 pm - Permalink
HOWEVER, why not just use SortList on the original WaveList result?
--Jim Prouty
Software Engineer, WaveMetrics, Inc.
August 13, 2013 at 09:42 pm - Permalink
August 14, 2013 at 06:16 am - Permalink