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

3 Ansichten (letzte 30 Tage)
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 Kommentar
Sam Chak
Sam Chak am 7 Apr. 2025
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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Matt J
Matt J am 7 Apr. 2025
Bearbeitet: Matt J am 8 Apr. 2025
[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

Weitere Antworten (0)

Kategorien

Mehr zu Interpolation finden Sie in Help Center und File Exchange

Produkte


Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by