creating waves without predefined names

In general, I want to write code that will make or create new waves when I do not have predetermined names for waves.

More specifically, I wrote a program to analyze a single set of data producing 30waves. I want to duplicate waves, perform CurveFit and other analysis. I want to also run this same code on a large batches of data. I do not know how to use Make or Duplicate statement in a loop such that name is of wave is changing. I tried using
Make "mywavename"+num2str(index)
but I'm realizing that Make needs a wave reference not a string.

You need the $ operator to tell make that the contents of the string should be used as the name:
Make/N=(whatever)/O/D $("name"+num2str(index))


Read Igor's help about this by executing these commands:

DisplayHelpTopic "Accessing Global Variables And Waves"
DisplayHelpTopic "Wave References"
DisplayHelpTopic "Accessing Waves In Functions"

You still need a wave reference, so you might change the above to this:
String wname = "name"+num2str(index)
Make/N=(whatever)/O/D $wname
Wave w=$wname


or, easier but requires at least Igor 6.1:
Make/N=(whatever)/O/D $("name"+num2str(index))/WAVE=w


In both cases, to refer to the wave in subsequent code, use the name w.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com