Find the area of the astroid

조회 수: 4 (최근 30일)
Srikar Kalivarapu
Srikar Kalivarapu 2016년 11월 16일
편집: KSSV 2016년 11월 17일
Find area of an astroid
  댓글 수: 1
Adam
Adam 2016년 11월 16일
Aren't asteroids usually 3d?

댓글을 달려면 로그인하십시오.

채택된 답변

KSSV
KSSV 2016년 11월 17일
편집: KSSV 2016년 11월 17일
a = 4 ;
% parametric equations of Asteroid
N = 1000; % keep more for accurate answer
t = linspace(0,2*pi,N) ;
x = a*cos(t).^3 ;
y = a*sin(t).^3 ;
plot(x,y)
% Get area using the curve points
A = polyarea(x,y) ;
% get area using the formula
Af = 3 * pi * a^2 / 8;
[A Af]

추가 답변 (3개)

KSSV
KSSV 2016년 11월 16일
doc polyarea.

Walter Roberson
Walter Roberson 2016년 11월 16일
solve() for y in terms of x and a. Integrate from x = 0 to x = a

Image Analyst
Image Analyst 2016년 11월 16일
Try this:
astroidArea = 3 * pi * a^2 / 8;
  댓글 수: 2
Srikar Kalivarapu
Srikar Kalivarapu 2016년 11월 16일
Can you give me a code for this
Image Analyst
Image Analyst 2016년 11월 16일
That IS code. You just need to define a.
a=10; % Whatever you want.
astroidArea = 3 * pi * a^2 / 8;

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by