Spline coordinates from spap2
7 次查看(过去 30 天)
显示 更早的评论
I am trying to get third order spline approximation for a given set of points.
p=[..;..];
spline=spap2(knots,3,p(1,:),p(2,:));
This works and I can use fnplt to plot the curve. Howver, I am not sure how I can get the orthogonal coordinates.
For cscvn, fnval would return a 2D matrix of coordinates. However, it does not work here. Is there any solution to this?
4 个评论
采纳的回答
Torsten
2022-6-29
编辑:Torsten
2022-6-29
x = -2:.2:2;
y=-1:.25:1;
[xx, yy] = ndgrid(x,y);
z = exp(-(xx.^2+yy.^2));
sp = spap2({augknt([-2:2],3),2},[3 4],{x,y},z);
xyq = [1.8;0];
value = fnval(sp,xyq)
exp(-xyq.'*xyq)
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spline Postprocessing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!