MATLAB: Is there a way to extract the width/diameter of the contour lines

diameterellipseImage Processing Toolboxintensity plotradius

I have this image which is an intensity plot of my laser beam:
Now I want to find the horizontal and vertical (1/e^2) diameter (distance is 100 µm/px). Do you have any suggestions on how to go about fitting an ellipse at the 1/e^2 threshold.
the countour function seams to draw nice interpolated lines would there be any idea in trying to extract the information from this plot? If I can specify the counter to only be drawn at the 1/e^2 level?

Best Answer

Get a binary image of your data where it's more than 1/e^2
binaryImage = data > 1 / exp(2);
Now get the boundaries:
boundaries = bwboundaries(binaryImage);
x = boundaries{:,2};
y = boundaries{:,1};