Methods for generating/storing a random number of variables?
daggaz
What I am doing now is just creating a new wave of the appropriate length and calling its point values as my variables, instead of creating actual variables. But so far I am forced to tack it onto a table and fill in the values, which seems cluttered (id prefer to have it run in the background, with GUI for input, instead of actually "seeing" the wave. )
I've tried running a set_variable GUI in a loop so that I fill in wave(i) points, but the program just hauls ass thru the loop, showing the GUI only once and I end up with a wave full of zeros and only the last point contains any user input. I was hoping more for a screen showing "i" set_variable GUIs so that I could set them all one by one. Putting a button in at the bottom so that the next function is called only after the user has input their values would be the next, and easy, step.
Or is there a more elegant solution?
string varstring, wName
Make/O/D/N=(ItemsInList(varstring)) $wName
wave w = $wName
w= str2num(StringFromList(p, varstring))
// eventually use another string to put DimLabels on
return 0
end
Then execute e.g.
You could execute this from the command line or enter the strings in a GUI.
May 10, 2012 at 01:52 am - Permalink
May 10, 2012 at 02:15 am - Permalink