How to construct a curve to replace the projected part of another curve?

2 次查看(过去 30 天)
In this image, there is a large bulge of the thin black line (data attached), how to construct a curve like the thick red line to replace the projected part and connect tangentially to two other parts of thin black line?
  1 个评论
Sam Chak
Sam Chak 2025-4-7
As long as you can provide the tangents at the two contact points and the distance between them, it is entirely possible to construct a smooth, beautiful red curve.

请先登录,再进行评论。

采纳的回答

Matt J
Matt J 2025-4-7
编辑:Matt J 2025-4-8
[x,y]=readvars('black thin line.xlsx');
[x,y]=splitapply( @(a,b)deal(mean(a),mean(b)), x,y, findgroups(x) );
sub=~(24.7<=x & x<=26.5);
yf=interp1(x(sub),y(sub),x,'spline');
plot(x,y,'--',x,yf,'-');
axis square; axis padded

更多回答(0 个)

类别

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

产品


版本

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by