using LoadWave without breaking down the columns into individual waves
Hello all,
I have two (for example) datasets in 64 x 250 form in .txt files. I want to use LoadWave to browse and load the whole files as waves so that I end up with just those two waves in the data folder. I am trying to modify the code below (which is so far breaking my individual files into 64 individual waves). Any help is much appreciated!
Thanks,
Vishi
Function CustomWaveSelect(fileName, pathName) String fileName // Name of file to load or "" to get dialog String pathName // Name of path or "" to get dialog Variable numwaves Variable indexwaves = 0 Prompt numwaves, "Enter number of waves to be plotted" // Set prompt for number of waves DoPrompt "Enter number of waves", numwaves if (V_Flag) return -1 // User canceled endif for (indexwaves=0;indexwaves <numwaves;indexwaves+=1) // Load the waves and set the local variables. LoadWave/J/D/O/P=$pathName fileName if (V_flag==0) // No waves loaded. Perhaps user canceled. return -1 endif endfor End
February 13, 2012 at 03:36 pm - Permalink
[quote=proland]Could you please provide more detail? You say you have 64 x 250 values in your text file (I'm assuming these are columns an rows since you end up with 64 individual waves). How is this data to be placed into two separate waves?? Are the first 32 supposed to be a single wave, or is it the first 125 rows? A lot of information is required in addition to your original post.[/quote]
February 13, 2012 at 04:07 pm - Permalink
February 13, 2012 at 04:19 pm - Permalink
[quote=mtaylor]Try adding the /M flag to your LoadWave command. /M indicates that it should load the data as a matrix wave.[/quote]
February 13, 2012 at 05:48 pm - Permalink