#pragma TextEncoding = "UTF-8" #pragma rtGlobals=3 // Use modern global access method and strict wave access. macro wave2image_old(prefix, dX, Xi, Xf) string prefix="Cu_0_" string suffix="_rt" variable dX=2 // Example of partition // Cannot create image if one of the following values is odd or there are missing waves in between variable Xi=-10 variable Xf=62 variable nE, nX nE=numpnts($(prefix+num2str(Xi)+suffix)) // Identical scaling for the 1D waves nX= abs((Xf-Xi)/dX)+1 make/O/N=(nX, nE) $(prefix+"Image"+suffix) variable i, j, k i=Xi k=0 do print i j=0 do if (Exists(prefix+num2str(i)+suffix)) $(prefix+"Image"+suffix)[k][j]=$(prefix+num2str(i)+suffix)[j] else $(prefix+"Image"+suffix)[k][j] = NaN endif j+=1 while (j