how do I extract the spline model and coefficients after I use fit with cubicinterp?
2 ビュー (過去 30 日間)
古いコメントを表示
I am using the fit() function to fit a cubic spline model to a set of 3D points. I then want to find out the details of the spline model generated and its coefficients so I can use that in further processing. I do this:
sfL = fit([vxL, vyL],vzL,'cubicinterp');
coeffsL = coeffvalues(sfL);
But do not know how to extract anything from coeffsL. How do I go about this? Previously I had done a polynomial fit to the same data as follows:
sf = fit([vx, vy],vz,'poly22');
coeffs(iVhi,:) = coeffvalues(sf);
Here I understood what 'poly22' meant from the documentation, and could extract the coeffs easily and use them to evaluate the polynomial for any point in parameter space.
0 件のコメント
回答 (1 件)
John D'Errico
2017 年 6 月 6 日
編集済み: John D'Errico
2017 年 6 月 6 日
A spline fit is not a simple function you can write down easily.
You can evaluate it at any point, and you are always given tools to do that evaluation. But you won't find anything useful by seeing analytical expressions of those functions. It would be messy as hell, and mean absolutely nothing to you.
Sorry.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Linear and Nonlinear Regression についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!