|
Thank you for your help. With little modifications I will get what I would like.
Thanks !
"Mark Hoyle" <Mark.Hoyle@mathworks.co.uk> wrote in message
<fj137e$8t2$1@fred.mathworks.com>...
>
> "Antoine " <a.lucas@geolnet.net> wrote in message
> news:fj0njh$k8v$1@fred.mathworks.com...
> > Hello World,
> >
> >
> > I am looking for "drawing" a 2D surface (e.g. Z(x,y)) where in somewhere
> > in this
> > surface, I would like to get a 1/4-ellipsoid shape.
> >
> > Starting with a space increment in X-axis and Y-axis, I would like to
> > discretize
> > my half-ellipsoid equation and put it into my 2D surface as shown on
fig.
> >
> > http://geologie.antwan.online.fr/fig-1.png
> >
> >
> > Thanks for your help
> >
> >
> >
> >
> >
> Try something like:
>
> x = linspace(0,3,31);
> y = linspace(-2,2,31);
> [X,Y] = meshgrid(x,y);
> Z = max(real(sqrt(1-(X.^2)/3-(Y.^2)/2)),0);
> mesh(X,Y,Z)
> axis equal
>
>
> Mark
>
>
|