How to extract -3 dB diameter from Matrix?
조회 수: 1 (최근 30일)
이전 댓글 표시
After taking measurements I get a two-dimensinal matrix of measurement values where the position in the Matrix corresponds to the position the measuerment was taken at. From this data I want to get the minimal and maximal -3 dB (Signal at 1/2 strenght) diameter, where 0 dB is the point in the Matrix with the maximal value.
Getting the curve through all points at -3 dB can be done with this:
[M, c] = contour(Matrix, [maxVal/2, maxVal/2]);
But I do not know how to continue with this. I thought about "slicing" the matrix with a number of lines through the maxVal-point at different angles and to then find the distance of the two points at the intersections of the line and the curve. But this does not seem to be a nice solution.
Is there an easier or more elegant solution?
The -3 dB-curves are usually ellipses.
댓글 수: 0
채택된 답변
Kelly Kearney
2021년 1월 25일
The coordinates of the contour line are saved in the c matrix, albeit in a less than user friendly format. I like using the contourcs function to get the values into a more usable format.
Once you have the coordinates, you could apply an ellipse-fitting routine to each contour line; there are a bunch of those available on the File Exchange too. The resulting ellipses will have associated parameters for their major and minor axis lengths and rotation.
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Contour Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!