How to return a wave from a function?
masheroz
I want to normalise some data in a 2D wave, and then assign that to a new wave so that I don't overwrite my existing data
I can see the wave "nd" in my data browser, but I can't figure out how to actually assign all of its values to the wave I want to.
function functionThatNormalises(data)
//things to normalise data into a new wave called "nd"
return nd //why can't I do this?
end
Make/O/N=(2814, 258) data
Make/O/N=(2814, 258) norm_data
// code in here that fills data with data from text files
norm_data = functionThatNormalises(data) //this doesn't work. How do I do this?
//things to normalise data into a new wave called "nd"
return nd //why can't I do this?
end
Make/O/N=(2814, 258) data
Make/O/N=(2814, 258) norm_data
// code in here that fills data with data from text files
norm_data = functionThatNormalises(data) //this doesn't work. How do I do this?
DisplayHelpTopic "Wave Reference Function Results"
is what you need.March 10, 2015 at 08:00 pm - Permalink
And here I was thinking the answer would be in the user-defined functions section on function syntax.
March 10, 2015 at 10:09 pm - Permalink