I am trying to write a function that grabs the wave names from the top graph or table and does the kendall statistical test on the waves(when there are only 2) but am having trouble with the whole tracelist to waves functions. Could someone suggest a way I can proceed here?
but am having trouble with the whole tracelist to waves functions.
That's pretty vague. It would be easier to answer if you said specifically what trouble you are having. But here is an example that might help:
Function Demo(graphNameStr) String graphNameStr // "" for top graph
String list = TraceNameList(graphNameStr,";",1)// Ignore traces that belong to contour plots Variable numTraces = ItemsInList(list) Variablei for(i=0; i<numTraces; i+=1) String traceNameStr = StringFromList(i, list) Wave w = TraceNameToWaveRef(graphNameStr, traceNameStr ) // Do something with w here Printi, NameOfWave(w) endfor End
Thanks for your reply Howard. More specifically I don't know how to implement the following in Igor:
Kendall test takes input as wave1, wave2
I would like to grab these waves from top graph and then use them in this test
Ex. graph has wave9 and wave10
Function would automatically insert kendall wave9,wave10 and do test on these waves
In summary I'don't know how to implement this automatic wave grabbing and passing the references to the stat test by programming.
I don't understand what you want to do. Perhaps someone else will.
Here are some help topics the might be of use:
DisplayHelpTopic "Wave References"
DisplayHelpTopic "Accessing Waves In Functions"
DisplayHelpTopic "Accessing Global Variables And Waves"
That's pretty vague. It would be easier to answer if you said specifically what trouble you are having. But here is an example that might help:
String graphNameStr // "" for top graph
String list = TraceNameList(graphNameStr,";",1) // Ignore traces that belong to contour plots
Variable numTraces = ItemsInList(list)
Variable i
for(i=0; i<numTraces; i+=1)
String traceNameStr = StringFromList(i, list)
Wave w = TraceNameToWaveRef(graphNameStr, traceNameStr )
// Do something with w here
Print i, NameOfWave(w)
endfor
End
February 24, 2014 at 06:12 pm - Permalink
Kendall test takes input as wave1, wave2
I would like to grab these waves from top graph and then use them in this test
Ex. graph has wave9 and wave10
Function would automatically insert kendall wave9,wave10 and do test on these waves
In summary I'don't know how to implement this automatic wave grabbing and passing the references to the stat test by programming.
February 24, 2014 at 09:40 pm - Permalink
Here are some help topics the might be of use:
DisplayHelpTopic "Wave References"
DisplayHelpTopic "Accessing Waves In Functions"
DisplayHelpTopic "Accessing Global Variables And Waves"
February 24, 2014 at 10:05 pm - Permalink