cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

1-Newbie

## Fitting a baseline to a data set and calculating the area under it.

Hi

I have this set of UV data . I want to first fit a beseline to this set of data and then calculate the integral with regard to that baseline .

i don't know if mathcad can do it , and if it can ,How?!?!?!

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby V
(To:MortezaA)

See attached for a more bold way for finding the base. Works well for the data you provided but should be tested for other data sets. Guess it would fail for some of them. I simply exclude all data points with a signal greater than the arithmetic mean of all data and then do a linear or exponential fit.

7 REPLIES 7
24-Ruby V
(To:MortezaA)

What exactly are you after? How would you define "baseline" in that context?

Would the attached be of any help?

1-Newbie
(To:Werner_E)

Thank you werner,It was totally helpful

samples of base line ( simple) is attached to this .

24-Ruby V
(To:MortezaA)

I think I see what is meant. Problem is how to distinguisg between the baseline signal and the actual signal.

Mathcad won't be able to do it out of the box so it would require some programming work in Mathcad. This again would require to agree upon an algorithm.

Just a rough idea, not sure if this would meet the point:

1) Decide upon the interval the signal should be taken

2) Smooth the signal (e.g. medsmooth) as from your pics it seems that the signals can be rather noisy

3) Cycle through the signal from both ends until the signal change is greater than ???... and take only the few endpoints left on both ends to do a linear or exponential fit (linfit, expfit) to get the baseline.

Sure 3) would require some refinements 😉

24-Ruby III
(To:MortezaA)
 Morteza Adinehnia wrote:HiI have this set of UV data . I want to first fit a beseline to this set of data

24-Ruby V
(To:MortezaA)

See attached for a more bold way for finding the base. Works well for the data you provided but should be tested for other data sets. Guess it would fail for some of them. I simply exclude all data points with a signal greater than the arithmetic mean of all data and then do a linear or exponential fit.

3-Visitor
(To:Werner_E)

Hi,  I have MathCAD 5.0 Prime, could someone convert this for me?  I have the same requirements

24-Ruby V
(To:ytterbium)

Here you are.

Haven't checked the Prime file so to be on the safe side I add a pdf-print of the Mathcad file so you see how it should look like.

Announcements