Create wave name from a variable
| Mantis | August 24, 2012 - 06:34 | ||
|---|---|---|---|
|
Very easy problem for you! I tried to find the answer everywhere I could but it still wrong... I want to call a wave name somewhere in my program like this: Function test (x) Variable x Wave wavename+x end And if I write "test (12)", I want to call the wave "wavename12"...i'me sure it's very easy, but I tried with "num2str" and everything like this but there's no way to work.... Thanks for your answer! Marc |
|||

Joined: 2010-05-14
Location: Germany
Do it like this:
Joined: 2009-10-07
Location: Germany
Hi,
checkout
The syntax is basically
Joined: 2007-06-29
Location: United States
In addition to the documentation referenced by thomas_braun, you should check these out:
DisplayHelpTopic "Accessing Waves In Functions"
DisplayHelpTopic "Accessing Global Variables And Waves"
DisplayHelpTopic "Wave References"
In case you are unfamiliar with DisplayHelpTopic, all you need to do is copy the command line, paste it into Igor's command line and press Enter.
The first discusses various direct solutions to your problem; the others are more general.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
Joined: 2012-08-24
Location: Switzerland
Thanks a lot for all your answers!
I thought so it was something with references but can't deal with it!
Thanks!