Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Problem with Creating an Ellipse using Meshgrid
Replies: 1   Last Post: Mar 6, 2013 12:49 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View  
Luca

Posts: 77
Registered: 6/6/12
Re: Problem with Creating an Ellipse using Meshgrid
Posted: Mar 6, 2013 12:49 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Corey " <cdavis2000@hotmail.com> wrote in message
> I am not sure if my equation is correct?

No, It's not.
Depending on what you want to do it should be something like
f = sqrt((x-x_c).^2/200 + (y-y_c).^2/900) -1
with x_c and y_c the center of your ellipse.
E.g.:
x_c = cols/2;
y_c = rows/2;


(and BTW, use ndgrid and not meshgrid. meshgrid is pure evil)



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.