fitting spline on data and getting equation

2 次查看(过去 30 天)
i have a table with 3 variables(B/H)= 1,2,3,4,5,6,7,8 and fi= 0,10,20,30 and h which is depend on (B/H) and fi that contains 32 values. for example for fi=0 and (B/H)=1 >>h=1 fi=0 and (B/H)=2 >>h=1.02 ...... fi=30 and (B/H)=8 >>h=14800
h:[ 1 1.02 1.11 1.21 1.3 1.4 1.59 1.78
1 1.11 1.35 1.62 1.95 2.33 3.34 4.77
1.01 1.39 2.12 3.29 5.17 8.29 22 61
1.13 2.5 6.36 17.5 50 150 1400 14800]
>>>>is there any way in MATLAB to fit spline on data and get equation for h in terms of (B/H) and fi??and how could we make sure that spline is a good fit for our data???
  2 个评论
Andrei Bobrov
Andrei Bobrov 2011-7-13
Hi milad!
it does not suit?
<http://www.mathworks.com/matlabcentral/answers/10582-deriving-surface-equation-form-data-on-a-table>
milad babaei
milad babaei 2011-7-13
Hi dear,
would you please answer my 2 comment below that previous code that u mentiond above?i have question about other h values on table and then about how u consider h values???on the other hand because of large range of h values from 1 to 14800 i coouldnt find any 2dweighted polynomial to fit well.so i am looking for a spline to fit well on h vales.would you please help me more to solve this problem anyway??

请先登录,再进行评论。

回答(1 个)

Bjorn Gustavsson
Bjorn Gustavsson 2011-7-13
If you have the spline toolbox you should take a look at spas2, spaps and csasp.
HTH,
  4 个评论
milad babaei
milad babaei 2011-7-21
tnx for your help, i plotted my data with mesh command and then try to 2d interpolate with inter2(linear method gives me better answer than spline somehow) and get pretty answer on interpolation.now i would like to know is there any way to find that equation which fitted my data and and also evaluate the interpolated data???
deb.P
deb.P 2019-11-8
i have the same question, that i have fitted a curve to my 3 variable data set. Now i want to know what is the equation of the fitted curve.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Spline Postprocessing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by