Find the area of the astroid

7 次查看(过去 30 天)
Find area of an astroid

采纳的回答

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 中查找有关 Programming 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by