How can I find the coefficients of a polynomial equation for fit the curve in MATLAB?

3 ビュー (過去 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
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
hosein Javan 2020 年 8 月 10 日
my mistake. my appologies.

サインインしてコメントする。

採用された回答

hosein Javan
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 件)

カテゴリ

Help Center および File ExchangePolynomials についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by