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

2 ビュー (過去 30 日間)
wd w
wd w 2025 年 4 月 7 日
編集済み: Matt J 2025 年 4 月 8 日
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 Center および File ExchangeInterpolation についてさらに検索

製品


リリース

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by