Determining the time(x-value) if a exponential function reaches a specific value using fit or any other funtion

조회 수: 1 (최근 30일)
Hi all, Is it possible to determine the time(x value) at which a nonlinear function reaches a specific value. The curve is nonlinear. How about curve fitting to exponential curve. How could the command fit and fitoptions be helpful in finding the x value ? Please guide

답변 (1개)

John D'Errico
John D'Errico 2017년 8월 2일
Why would you need to approximate a given function using another (exponential) function, and only then solve for a time?
Use fzero, assuming that you already have a function.
Is it that you only have data points? Then you will need to postulate a model. How can we know if an exponential is right for your problem though? Only you know that. Anyway, if so, then you already know you need to use fit, so wtp? read the help and examples for the curve fitting toolbox.
  댓글 수: 3
John D'Errico
John D'Errico 2017년 8월 2일
I don't understand why you are having a problem. Just use fit. I assume the fittype will be exp1.
At that point, it is basic algebra.
divide 100 (your target) by a.
take the log.
divide by b.
Do you not know how to extract the coefficients from a fit? Use methods to tell you what methods are available. Something like coeffvalues as I recall will do the trick there, but methods will tell you.
Pranav
Pranav 2017년 8월 3일
Thanks again.
I understand how the coeffs can be found by using available example models. But what I am trying is to avoid the algebra and find x using predint cmd or other cmds using the coeffs given by fit.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Linear and Nonlinear Regression에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by