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
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.
Hello, proland! Thanks! I'll try to clarify: I have two files that have the same structure, 250 rows by 64 columns. I want to load these two files as two waves, that is I want to have two 250x64 waves. Instead, LoadWave converts columns into waves and I end up with 130 waves. Did it make it clearer?

proland wrote:
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.

Try adding the /M flag to your LoadWave command. /M indicates that it should load the data as a matrix wave.
Thank you, mtaylor!!! It worked out nicely!
mtaylor wrote:
Try adding the /M flag to your LoadWave command. /M indicates that it should load the data as a matrix wave.