How to apply custom equation on a curve and find unknown parameter
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
回答(2 个)
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 个评论
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
2011-3-8
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 个评论
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 Center 和 File Exchange 中查找有关 Interpolation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!