How can I find the coefficients of a polynomial equation for fit the curve in MATLAB?
1 次查看(过去 30 天)
显示 更早的评论
hello. my polynomial equation is ( V)=c0+c1*T+c2*(t^2)-c3*P-c4*P*T i want use data for find c0 ,c1, ...c4 coefficients (i want fit data with this equation)
my p,v,t data is
100000 , 0.956 , 19.4
100000 , 0.9717 , 71.1
10000000 , 0.959 , 41.8
80000000, 0.9725 , 161 ...
thank you.
2 个评论
Image Analyst
2020-8-10
Hosein, can you move this down to the Answers section below, rather than up here in Comments, which is used to ask people for clarification of their question. You can even earn credit if it's down there.
采纳的回答
hosein Javan
2020-8-10
if "p" and "t" are both independant variables then your problem is in the form of "y=f(x,z)" or "v=f(p,t)".
x=[
19.4
71.1
41.8
161
180
]; % t
y=[
100000
100000
10000000
80000000
100000000
]; % p
z=[
0.956
0.9717
0.959
0.9725
0.9999
]; % z
sf = fit([y, x],z,'poly21')
plot(sf,[y,x],z)
look at command window,
sf(x,y) = p00 + p10*x + p01*y + p20*x^2 + p11*x*y
V(t,p) = c0 +c1*T - c3*P +c2*(t^2) - c4*T*P
by comparing you will understant that:
c0=p00
c1=p10
c3=-p01
c2=p20
c4=-p11;
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Polynomials 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!