convert a data to a function

조회 수: 18 (최근 30일)
JEDIDI Ran
JEDIDI Ran 2020년 6월 3일
댓글: JEDIDI Ran 2020년 6월 5일
Hi, i have currently received a data ( table of points (xi, yi)
and i want to convert it even approximatively to a function
is that possible with matlab ?
need help!
  댓글 수: 2
madhan ravi
madhan ravi 2020년 6월 3일
Are you talking about fitting ?
JEDIDI Ran
JEDIDI Ran 2020년 6월 3일
i have number of point (x,y) like that , and i want to turn it as function y=f(x) (get it expression) the closet function to the plot
2.07E+00 0.45
2.07E+00 1.37
2.07E+00 2.33
2.07E+00 3.36
2.07E+00 4.45
2.07E+00 5.59
2.07E+00 6.8
2.08E+00 8.07
2.08E+00 9.4
2.08E+00 10.8
2.08E+00 12.29
2.08E+00 13.8

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

답변 (1개)

madhan ravi
madhan ravi 2020년 6월 3일
  댓글 수: 2
JEDIDI Ran
JEDIDI Ran 2020년 6월 3일
thanks !
JEDIDI Ran
JEDIDI Ran 2020년 6월 5일
i have used polyfit function to do so and i have got that plot the red one is the polyfit function , the blue is the one i have it data , as you see they are close to each other but
P(t)= =2.995134969444502*(10^3)*(t^10)+(2.454194242827056*(10^3))*(t^9)-(3.074449680687996*(10^4))*(t^8)-(1.831814183200164*(10^4))*(t^7)+(1.225116448716314*(10^5))*(t^6)+(1.225116448716314*(10^5))*(t^5)-(2.265044070414277*(10^5))*(t^4)+(6.259310423328208*(10^2))*(t^3)+(1.720638633336634*(10^5))*(t^2)+(8.587517861009773*(10^4))*t+(2.102731998692876*(10^5));
so P(t=0)= (2.102731998692876*(10^5)) different from zero
what should i do to make it close ?

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

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by