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
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!