#pragma TextEncoding = "MacRoman" #pragma rtGlobals=3 // Use modern global access method and strict wave access. // creates an image from all suitable waves in current folder Function wave2image(String prefix, String suffix) String dataList = WaveList(prefix+"*"+suffix,";","") // list of suitable waves in current folder dataList = SortList(dataList, ";", 16) // make sure the list is in the right order Variable i, items = ItemsInList(dataList) Make/free/N=(items) tempIndices = NaN // the free flag creates transient data for (i=0; i