Loadwave "not enough columns in the file..."

Hello all,

I did a quick forum/google search but was unable to come up with an answer for my question. The Igor help file was also of no use....

When I go to "Load Waves..." and select the file I wish to load, with everything correct in the created wave, Igor spits out:
LoadWave/J/M/U={0,1,0,0}/D/A=wave/K=0/V={" "," $",0,0} "filepath"

My goal is to put this into a procedure file where the filepath is prompted with a popup. The problem is that I am quite unsure of what all the arguments in the LoadWave call mean. I know /M is for a matrix format of the output but that's all I really have.

The title of the post refers to the error I get when trying to put the function call into a procedure file like this:
LoadWave/J/M/U={0,1,0,0}/D/A=wave/K=1/N=CCN

Again, I'm not sure what 85% of the function modifiers mean so I've just been trying to go about this by trial and error!



Any help is greatly appreciated!
You can right-click on the word "LoadWave" and select Help for LoadWave. That will take you to the reference help for the operation. It's a fairly complicated operation but not beyond human understanding :)

You might also want to read the manual about loading data. Execute this command on Igor's command line:

DisplayHelpTopic "Importing and Exporting Data"

You can also work in the dialog you by choosing Load Waves->Load Waves. Turn checkboxes, etc., on and off and see how it affects the generated command.

You are correct- /M means load into a matrix. /U={0,1,0,0} means that the first column of the file will be interpreted as "row positions". That will be read and converted into either a 1D wave to be used in conjunction with the matrix, giving uneven X values, or it will be used to set the X scaling of the loaded matrix wave. That flag uses up the first column, data has to start in the second column.

The error message means that there are no columns left over, which implies that the file has only one column. That doesn't sound like a matrix...

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Thanks for that help, I am a little more certain what each of the modifiers means and I understand why I was getting that error.

Sidetracking just a little bit, is there a tutorial somewhere about how to prompt a user for an input? In particular, I am trying to load a wave that always has the same name but is separated into different folders by date. I would like to prompt the user to select the folder of interest so I can just let LoadWave go from there.

I know this will involve the NewPath function which I think I understand, I just don't get how to ask for the path itself.


Again, any help appreciated.
Execute this:
DisplayHelpTopic "Interacting With The User"


and this

DisplayHelpTopic "Displaying an Open File Dialog"