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 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