Calling Waves with Strings for Expressions
benlucas
Fri, 07/19/2013 - 05:37 pm
I'm having an issue calling waves using strings and the $ command.
I've created a function which creates a series of waves with a sequence of strings and $, however when I want to call them for use an expression, I get an error message saying "$ cannot be used in this way in a function"
I've written down a basic sample code with what I'm trying to do. If anyone could shed some light on this issue, it would be appreciated.
variable j=10
string a = "Flux"+num2str(j)
Make/N=1000/D $a
variable i=10
string wavename="Flux"+num2str(i)
$wavename[0]+=10
////
error!
///
string a = "Flux"+num2str(j)
Make/N=1000/D $a
variable i=10
string wavename="Flux"+num2str(i)
$wavename[0]+=10
////
error!
///
string a = "Flux"+num2str(j)
Make/N=1000/D $a
Wave aWave = $a // aWave is the wave reference
aWave = <something>
variable i=10
string name="Flux"+num2str(i)
Wave w = $name // w is the wave reference
w[0]+=10
For details execute:
July 19, 2013 at 06:04 pm - Permalink
July 22, 2013 at 12:15 pm - Permalink