point values from the curve

1 次查看(过去 30 天)
sudipta
sudipta 2011-3-23
i have a discontinuous 2d signal.By using the spline curve i made this continuous.My problem is how do i get the equation for all dicontinuous parts or the main objective is how do I get point values from the curve(discontinuous part)?

回答(1 个)

Sarah Wait Zaranek
Sarah Wait Zaranek 2011-3-23
If you want to get points from a spline curve - I would suggest using ppval
x = 1:10;
y = cos(x);
pp = spline(x,y);
valY = ppval(pp,1)
If you want the piecewise equations, unmkpp will help you out:
[breaks,coefs,l,k,d] = unmkpp(pp)
This is assuming you are using spline in core MALTAB. Let me know if you are using another spline method (in a toolbox).

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by