How to extract -3 dB diameter from Matrix?

2 ビュー (過去 30 日間)
Jonas
Jonas 2021 年 1 月 25 日
回答済み: Kelly Kearney 2021 年 1 月 25 日
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.

採用された回答

Kelly Kearney
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 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by