Calculate the length of the major axis of an ellipse using its perimeter

26 ビュー (過去 30 日間)
Vahid Esmaeili
Vahid Esmaeili 2020 年 8 月 26 日
回答済み: Image Analyst 2020 年 8 月 26 日
Hello,
I am wondering how to calculate the length of the major axis of an ellipse using its perimeter in MATLAB? In fact, I have the perimeter of the forefoot (which is like an ellipse) but I need its major axis.
Thank you so much,

採用された回答

Image Analyst
Image Analyst 2020 年 8 月 26 日
Vahid, if you have the Statistics and Machine Learning toolbox you can use pdist2(). If you have an N-by-2 array of (x,y) coordinates, you can do
distances = pdist2(xy, xy);
majorAxisLength = max(distances(:)) % Twice the semi-major radius value.
If you don't have that toolbox, you can easily compute the distances of every point to every other point using a pair of for loops.

その他の回答 (1 件)

John D'Errico
John D'Errico 2020 年 8 月 26 日
編集済み: John D'Errico 2020 年 8 月 26 日
You can't.
That is, knowing ONLY the perimeter of an ellipse, you CANNOT know the major axis. That is, I can give you two ellipses, one of which is a perfect circle, and the other an infinitely narrow ellipse, yet both of them will have the same perimeter. Of course in the two cases, they will have very different shapes.
So case closed, you cannot do what you have asked to compute. You need to provide more information. And perhaps do some reading.
For example, if you are willing to provide some other parameter, such as the minor axis length, or the eccentricity, then it is possible to compute the major axis length.
  1 件のコメント
Vahid Esmaeili
Vahid Esmaeili 2020 年 8 月 26 日
Dear John,
Thank you so much for your reply and advice. I have the data of the attached markers on different parts of the foot (as shown in the figure). I tried different ways to find the answer before asking my question. As they did not work, I decided to ask experts on this popular website. Here are the data of the mentioned markers (middle of the heel, right lateral malleolus, the tip of big toe, head of 5th metatarsal bone). The length of the foot is 37 cm and the perimeter is 35 cm.

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by