Integration wrt to required variable

Hi,

My problem should have been solved quite simply but I have tried many times and I don't seem to get anywhere. I am a rookie with Igor.

I have a function BY of a variable Zm (stored as separate waves of the same length). I would like to integrate BY wrt to Zm and plot a result as a function of Zm. But when I used "integrate" command from a menu it did not give an option to chose integration variable but instead used something called "_calculated_".

Also tried defining X througn "Integrate BY/X = Zm/D = BY_INT" but it said X data does not match Y data in length or type.

I would really appreciate if someone would point me in the right direction.

Nik.
Are Zm and BY truly the same number of points? Do one of the following to check:

At the command line ...

print numpnts(BY); print numpnts(Zm)

(the two values MUST match)

print numtype(BY); print numtype(Zm)

(the two values should also match)

AND/OR ...

edit BY, Zm .... (and then look in the table to see they are the same number of points)

--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH
jjweimer wrote:
Are Zm and BY truly the same number of points? Do one of the following to check:

At the command line ...
print numpnts(BY); print numpnts(Zm)
(the two values MUST match)
print numtype(BY); print numtype(Zm)
(the two values should also match)
AND/OR ...
edit BY, Zm .... (and then look in the table to see they are the same number of points)
--
J. J. Weimer
Chemistry / Chemical & Materials Engineering, UAH


Thanks for the reply jjweimer.

I have made the check and they seem to be exactly the same, here's the result:
---
print numpnts(BY); print numpnts(Zm)
50001
50001
•print numtype(BY(1)); print numtype(Zm(1))
0
0
---

...this is what the manual says:

"......Rectangular integration (/METH=0 or 2) requires an X wave having one more point than
the number of elements in the dimension of the Y wave being integrated. ..."

Or chose a different algorithm in the integrate menu - then it should work.
Cheers
Christian
ChrLie wrote:
...this is what the manual says:

"......Rectangular integration (/METH=0 or 2) requires an X wave having one more point than
the number of elements in the dimension of the Y wave being integrated. ..."

Or chose a different algorithm in the integrate menu - then it should work.
Cheers
Christian


Thanks for help ChrLie, it works great, I didn't know about this one!

Another way I was shown (just share it, maybe it will be useful for some) is to use X scaling of my BY wave. this way "_calculated_" can be used as an Xwave with a correct result.