Using simple comparison to visualize overlap between two curves results in low overlap values being sorted to the end of the array
조회 수: 1 (최근 30일)
이전 댓글 표시
As found here: https://uk.mathworks.com/matlabcentral/answers/361760-area-between-two-overlapping-plots
I'm using a simple comparison to visualize the overlap between two curves.
y_d = [y2(y2<y1) y1(y1<y2)];
However, it seems as though all the sections with near-zero overlap (orange curve is on the order of 10E-7) are sorted to the end of the array, completely shifting the whole thing out of alignment.
I've realised that this method essentially creates two lists - the points where y1>y2 and the points where y2>y1, and then simply concatenates them together.
Are there any alternative methods that would conserve the relative positions of the points?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/578432/image.png)
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!