Fit a curve based on its area?

3 次查看(过去 30 天)
Larissa Perez
Larissa Perez 2017-1-17
Hi everyone! Basically, I need to estimate a curve based on its integral. I don't know the actual function.
I know my x values will be (0:1000). I know the area when x = 0:30 is 10% of the total area, x = 0:60 is 50% and x = 0:80 is 90%.
I have no idea where to start! I have tried using curve fitting tools but didn't succeed. Can someone help me with that?
Cheers!
  13 个评论
David Goodmanson
David Goodmanson 2017-1-18
编辑:David Goodmanson 2017-1-18
Your best bet here may be the log normal distribution which is often used for particle sizes and a lot of other situations. You assume the log of particle size is normally distributed. For a good fit, log of the d50 size should be right in between log of the d10 size and log of the d90 size. So log(60) should be halfway between log(33) and log(95). Those three values are
ans = 3.4965 4.0943 4.5539
and not equally spaced. But fitting those three points with a straight line may be the best you can do. That fit is pretty decent, not super.
Larissa Perez
Larissa Perez 2017-1-19
I really appreciate your help! Thanks for that. :)

请先登录,再进行评论。

回答(1 个)

Walter Roberson
Walter Roberson 2017-1-17
编辑:Walter Roberson 2017-1-17
one of the solutions is
syms a b c d e F(x) f(x)
F(x) = a*x^4+b*x^3+c*x^2+d*x+e
sol = solve([F(30)-F(0)==10,F(60)-F(0)==50,F(80)-F(0)==90,F(1000)-F(0)==100])
f(x) = subs(diff(F(x),x),{a,b,c,d},{sol.a,sol.b,sol.c,sol.d})
For each additional known point you have, add another term to F(x) and add the point to the solve() expression.
This is based upon the fact that the indefinite integral is taken and becomes an actual function, and that the definite integral is determined by the subtraction of the value of the indefinite integral at the end points. F(x) is acting as the indefinite integral. You can then create simultaneous equations out of it and solve for the coefficients. Then substitute those into the derivative of F(x) to get the original f(x)

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by