Ellipse around the data in MATLAB

后端 未结 3 584
太阳男子
太阳男子 2020-12-08 16:56

I would like to reproduce the following figure in MATLAB:

\"exampleee.png\"

There are two classes of po

3条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-08 17:33

    I'd try the following approach:

    1. Calculate the x-y centroid for the center of the ellipse (x,y in the linked question)
    2. Calculate the linear regression fit line to get the orientation of the ellipse's major axis (angle)
    3. Calculate the standard deviation in the x and y axes
    4. Translate the x-y standard deviations so they're orthogonal to the fit line (a,b)

提交回复
热议问题