x2pnt vs FindValue

Hi guys,

I'm a bit confused with the usage of
x2pnt
and its relationship with
FindValue
.
In the past I have been able to use
x2pnt
to delimit a region of a wave to be fitted by an equation and all worked good.

Today, when attempting to use
x2pnt
again in another procedure I still cannot understand the output I was getting.
For example, for a random wave with n number of points, every time I tried to print
x2pnt(wavename, xvalue)
, instead of printing out the point/position of the xvalue on the wave, I just got xvalue itself. I ended up going for
FindValues
which worked fine.

What am I missing here? Is there any limitation in the use of x2pnt that I am not considering? the documentation seems quite trivial about it.
What is the difference between the two functions in terms of usage?

Thanks in advance.

R.
PS: Incidentally,
pnt2x
was also printing the point number rather than the xvalue.
Maybe the delta value is set to 1 by accident? Are you using an x-wave?
what does

print dimdelta(wavename, 0)

say?

HJ
FindValue searches the values assigned to each data point of the wave, x2pnt searches the x-scaling of the wave set with SetScale, not the actual values in the wave.
You're welcome.
Could you share the basic concept of your solution to others with a similar issue?
HJ
Essentially, I followed your input. I did not realize that
x2pnt
would work only on xwaves. The
DisplayHelpTopic "x2pnt"
treats it very trivially and the lack of an error message also did not help. My former use of the function was incidentally on waveforms, so I did not encounter this problem back then, and was now a bit confused. Many thanks again for the help.

Cheers,
R.
The documentation for x2pnt links to "The Waveform Model of Data". Read that section carefully about three times. It is important.

Also, the guided tour section "Waves - The Key Igor Concept" covers much of the same material. If you have not done the guided tour, choose Help->Getting Started. It is essential for understanding Igor.