How to calculate the difference between two Areas?
이전 댓글 표시
Hi.
I have two areas.

How can I obtain the difference between these two?
How can I then minimize the difference by translating the second area?
Or even better, how can I display the difference between areas as a funcion of the amont of translation done to the second area?
댓글 수: 4
Star Strider
2019년 11월 20일
They look alike (to me). (The waves on the top is a nice touch!)
Code, data, and more information about them would be helpful.
Gabriele Colasurdo
2019년 11월 20일
Star Strider
2019년 11월 20일
Code and data would be helpful.
Gabriele Colasurdo
2019년 11월 20일
답변 (1개)
Ridwan Alam
2019년 11월 20일
편집: Ridwan Alam
2019년 11월 20일
If you just want to align those two profiles using angle values, then I would use findpeaks() on both and look at their differences.
% angle1, angle2 are arrays
[~,peaklocs1] = findpeaks(angle1); % add options such as "MinPeakDistance" and others as necessary
[~,peaklocs2] = findpeaks(angle2);
if peaklocs2(1)>peaklocs1(1)
alignment = peaklocs2(1) - peaklocs1(1)
else
alignment = peaklocs1(1) - peaklocs2(1)
end
카테고리
도움말 센터 및 File Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

