Find the area of the astroid
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Respuesta aceptada
KSSV
el 17 de Nov. de 2016
Editada: KSSV
el 17 de Nov. de 2016
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]
0 comentarios
Más respuestas (3)
Walter Roberson
el 16 de Nov. de 2016
solve() for y in terms of x and a. Integrate from x = 0 to x = a
0 comentarios
Image Analyst
el 16 de Nov. de 2016
2 comentarios
Image Analyst
el 16 de Nov. de 2016
That IS code. You just need to define a.
a=10; % Whatever you want.
astroidArea = 3 * pi * a^2 / 8;
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!