Bug?...Or Change in Igor Operation
ctmckee
Function DisplayXY(xWaveNameStr, yWaveNameStr)
String xWaveNameStr, yWaveNameStr
Display $yWaveNameStr vs $xWaveNameStr
End
String xWaveNameStr, yWaveNameStr
Display $yWaveNameStr vs $xWaveNameStr
End
I have two integer waves that I tried to graph with this function, but get a SyntaxError message that says "Expected text wave". Has something changed (I'm using Igor 6.31), or am I simply missing something?
Clayton
Without actually testing, I wonder should this be the coding instead ...
String xWaveNameStr, yWaveNameStr
wave xwave = $xWaveNameStr
wave ywave = $yWaveNameStr
Display ywave vs xwave
return 0
End
Alternatively, are you certain that you are inside the folder containing the two waves (and not for example at root:).
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAHuntsville
March 25, 2013 at 11:08 am - Permalink
DisplayXY("wave1", "wave0") //names of waves as strings
March 25, 2013 at 11:13 am - Permalink
This works for me in Igor Pro 6.31:
Function DisplayXY(xWaveNameStr, yWaveNameStr)
String xWaveNameStr, yWaveNameStr
Display $yWaveNameStr vs $xWaveNameStr
End
Function Test()
Make/O/I xwave=p, ywave=sin(p/8)
DisplayXY("xwave", "ywave")
End
Possibly the error message is not coming from where you think it is. Try stepping through it with the Igor Debugger.
If you can't determine the problem post a complete example or attach an experiment file that illustrates the problem.
March 25, 2013 at 11:15 am - Permalink
C
March 25, 2013 at 12:12 pm - Permalink