How to apply custom equation on a curve and find unknown parameter

조회 수: 1 (최근 30일)
Abdul Samad
Abdul Samad 2011년 3월 8일
댓글: Walter Roberson 2019년 7월 25일
I've a curve and I've to apply following custom equation and have to find the unknown parameters A and B
y=3.379-(A*X^2/(B+X))
please guide me how can I do this operation.

답변 (2개)

Andreas Goser
Andreas Goser 2011년 3월 8일
When you write "I have a curve", I assume you have data. Make sure the data X and y is in your MATLAB workspace.
Start CFTOOL
Import the data (DATA button)
Use the FITTING button and choose customer equiation as TYPE OF FIT
  댓글 수: 2
Andrew Newell
Andrew Newell 2011년 3월 8일
If you have the Curve Fitting Toolbox.
Andreas Goser
Andreas Goser 2011년 3월 8일
True. Here an overview over multiple options with MATLAB: <http://www.mathworks.com/support/tech-notes/1500/1508.html>
But I'd say CFTOOL is the absolute easiest way for a new user to do fitting.

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


Matt Tearle
Matt Tearle 2011년 3월 8일
If you have Statistics Toolbox, use nlinfit.
f = @(b,x) 3.379 - (b(1)*x.^2./(b(2)+x))
bfit = nlinfit(xdata,ydata,f,b0)
where xdata and ydata are your data values to fit to, and b0 is an initial guess for the parameters
  댓글 수: 2
Ketan Shende
Ketan Shende 2019년 7월 25일
What does b0 look like?
Walter Roberson
Walter Roberson 2019년 7월 25일
In this b0 would be a vector of length 2 of numeric values, which will serve as initial guess for the search.

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

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by