Question about wave indexing

Hi,

For a function I have made I need to use the values stored in a waves index. However I can't figure out how to call that portion of the data (i.e. when I try calling something like MyWave.x I get an error message that says "expected wave name"). Is there any way to selectively call just the indexed data or possibly make a new wave from just the index? Thanks

Kevin
I'm not exactly sure what you mean by a wave's index. Giving an example of the function you're calling and the command(s) you're using to call it would help.

You can pick out a range of points a few different ways. One is to make a new wave from containing a subregion of the original wave, as you suggested:

Duplicate/R=[start_point,end_point]  original_wave, new_subregion_wave

or
Duplicate/R=(startX,endX) original_wave, new_subregion_wave


In the former syntax (with square brackets), the range is determined by point values of the original wave; in the latter syntax (with round brackets), the range is determined by the wave's scaled point values. More information is given in the help file for the duplicate function (type into the command line displayhelptopic "duplicate" or right-click duplicate on the command line and select help)

There are other ways to work with a subrange of a wave that do not require copying to a new wave. Working through the guided tour of Igor (in volume 1 of the Igor Pro manual) is a good way to become acquainted with them. You can also get some useful information by typing into the command line:
displayhelptopic "Waveform Arithmetic and Assignment"
Here is an example:
Make/O/N=5 yData = p
SetScale/P x, 0, .25, yData
Duplicate yData, xData
xData = x  // Set data values of xData equal to X values


If you want to know the X value of a given point of a given wave, use the pnt2x function.
hrodstein wrote:
Here is an example:
Make/O/N=5 yData = p
SetScale/P x, 0, .25, yData
Duplicate yData, xData
xData = x  // Set data values of xData equal to X values


If you want to know the X value of a given point of a given wave, use the pnt2x function.


Thanks hrodstein that was what i needed