fit curves by smoothingspline

조회 수: 2 (최근 30일)
yizheng li
yizheng li 2019년 6월 14일
댓글: Matt J 2019년 6월 14일
I have a sets of data, and I want to plot them in dot then fit them with curve, but the fitted curve doesnt seems fit very well(the curve is so far away from realy point. I'm using the code below for fit, did I make some mistake?
clear all
load positiontest.mat
xx;
Pattern3;
curve3 = fit(xx,Pattern3,'smoothingspline');
figure,
plot(curve3,xx,Pattern2)

답변 (1개)

Matt J
Matt J 2019년 6월 14일
Shouldn't this be,
plot(curve3,xx,Pattern3)
  댓글 수: 2
yizheng li
yizheng li 2019년 6월 14일
untitled.pngthanks , I just notice thie typo. But even though I fix it, the first half of this graph still seems not fit well
Matt J
Matt J 2019년 6월 14일
You might have to experiment with the SmoothingParam input parameter, e.g.
f = fit(xx,Pattern3,'smoothingspline','SmoothingParam',0.07);

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

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by