How to extract -3 dB diameter from Matrix?

3 visualizaciones (últimos 30 días)
Jonas
Jonas el 25 de En. de 2021
Respondida: Kelly Kearney el 25 de En. de 2021
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.

Respuesta aceptada

Kelly Kearney
Kelly Kearney el 25 de En. de 2021
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.

Más respuestas (0)

Categorías

Más información sobre Contour Plots en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by