need help drawing ellipse PLEASE

조회 수: 3 (최근 30일)
Ahsan Khan
Ahsan Khan 2014년 10월 24일
댓글: Image Analyst 2014년 10월 24일
hi guys
I am trying to draw the orbits of an asteroid and earth for an assignment. I am using the pdeellip tool to do his. I have all the info needed and have plotted it. but the problem that I am having is that how do I set the x y label of the axes, set min max axis values and also how do I make it so the ellipse drawn is just the border lines and not filled. any help would be greatly appreciated. thank you.
{
clear all
clc
format long g
% eccentricity e_asteroid = 0.207598246; %given
e_earth = 0.01671123;
% Semi-major axis length
a_asteroid = 1.75; %AU calculated in part b
a_earth = 1; %AU
% Semi-minor axis length
b_asteroid = a_asteroid*(1-(e_asteroid^2))^0.5; %AU
b_earth = a_earth*(1-(e_earth^2))^0.5; %AU
pdeellip(0,0,a_earth,b_earth,pi/4,'Earth Orbit')
pdeellip(0,0,a_asteroid,b_asteroid,pi/4,'Asteroid Orbit')
}
  댓글 수: 1
Image Analyst
Image Analyst 2014년 10월 24일
Read this: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup. Also, enclosing your whole code in braces means you're trying to make all of that the contents of a cell, which would probably throw an exception. Read up on cell arrays here: http://matlab.wikia.com/wiki/FAQ#What_is_a_cell_array.3F, and another way to do ellipses in the FAQ: http://matlab.wikia.com/wiki/FAQ#How_do_I_create_an_ellipse.3F

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Point Cloud Processing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by