value of point with certain x=0

Dear all.

I am quite new to igor, so these are elemantal queations.
1 I got a rough curve, how to get the value of y when x=0
2 how to get the slope of a point with certain value, eg. x=0

Thanks in advance
Does your data employ x scaling, or is there a corresponding "x" wave?
(checkout:
DisplayHelpTopic "Waveform Versus XY Data"

)

If it's the former you can use:

print ywave(0)


if not you have to use:
print interp(0, xwave, ywave)
Thank you. I tried your method. In my case, my "ywave" is "Polarization 5.1". Therefore, I tried
print polarization 5.1 (0). Then, it poped up"unknown name or symbol" and "polarization" is in black. I am not able to correct it.

I had to insert pointand got the value of polarization 5.1 when x=0, but I think it's a silly way.
Richardcao wrote:
... I tried print polarization 5.1 (0). Then, it poped up"unknown name or symbol" and "polarization" is in black. I am not able to correct it.


Your wave name is "liberal" and needs to be surrounded by single quotes to be used. So to print try

print 'polarization 5.1'(0)

If you want to avoid needing the qoutes, then you could change the wave name to something like: polarization_5_1

Type the following into the command line in Igor for more information on programming with liberal names:

displayhelptopic "Programming with Liberal Names"
Looking at your data it seems to me as if your data is contained in two waves, one with x values and one with y values.

This is important - how many traces are plotted in your figure?

If I'm right then you're definitely not using wave scaling since the x-values of your data are not monotonic. That means that wave(0) will not return what you want.

You need monotonic x-values to do interpolation. What you would need to do then is to split your x and y wave into four waves.
- an x and y wave that contain the forward sweep (the part of the data where the x-values increase)
- an x and y wave that contain the reverse sweep (the part of the data where the x-values decrease)

If there is only one intercept (it's hard to tell from your plot) then you only need to have the waves that contain the zero crossing.

Probably the easiest way for you to do this is to just copy/paste the relevant values into new waves from a table.

Once that is done you'll need to use the interp function. Try executing DisplayHelpTopic "interp". Hint: you'll need to type something like Print Interp(0, myWaveWithXValues, myWaveWithYValues).

For the approximate derivative you'll need to turn to the Differentiate operation, and combine it with the interpolation trick mentioned, taking care to remember that differentiate reduces the input dimensions by one. Also take care that Differentiate overwrites its input by default.