Make a new wave by multiplying two others with all wavenames in variables?
reepingk
$(wav+"_2")=$(wav+"_0")*$(wav+"_1")
I've tried every variation, with and without $, with the keyword "Wave" and a bunch of other things. I'm stumped. I've even tried assigning the values when the wave is made.
This line works fine.
Make/D $(wav+"_2")
While this one doesn't
Make/D $(wav+"_2")=$(wav+"_0")*$(wav+"_1")
Again, I apologize, this is extremely simple. I can do it on the command line just fine with the actual wave names, but not with the variables. Igor doesn't like my use of the $, but if I don't use it then igor doesn't know that I'm referring to a wave, correct?
As of right now, I've simply modified the bash script using awk to multiply the columns together. This works fine, but I'm trying to do as much of the arithmetic in igor. (For greater portability.)
wave
statement.wave mw0 = $wn0
string wn1 = wav + "_1"
wave mw1 = $wn1
string wn2 = wav + "_2"
make/O/D $wn2
wave mw2 = $wn
mw2 = mw1*mw0
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
July 1, 2013 at 01:56 pm - Permalink
DisplayHelpTopic "Wave References"
.July 2, 2013 at 06:21 am - Permalink
Duplicate
instead ofMake
for initialising the target array. Then you don't need to worry about the correct size of the latter.July 3, 2013 at 03:21 am - Permalink