$("someWave")[1]=5 not working

Hi,

I created someWave. $("someWave")[1]=5 works in command window but not if I put that exact line into a function. I don't know how many waves I'll have and I need to access them one after the other about a million times. So that would really simplify things. Any ideas why it doesn't work?

-Max
In a function, you need to create a wave reference in order to use a wave in an assignment statement.

Assuming your wave is in the current data folder:
Wave someWave
someWave[1] = 5


For details, execute this in Igor:
DisplayHelpTopic "Accessing Global Variables And Waves"