The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

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  

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 " <> 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.
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]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.