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 Center および File ExchangeGeometry and Mesh についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by