Search All of the Math Forum:

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

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

Topic: drawing problem
Replies: 0

 Juan Rufilanchas Posts: 2 Registered: 12/7/04
drawing problem
Posted: Jun 26, 1996 8:21 AM

I am tryng to draw a 2D surface it looks easy but it is not.
I have two vectors x,y with the X and Y values of 100 plots, here I give you
the first ten of them,:

x=[-0.2865 0.2510 -0.4455 -0.1026 -0.6662 -0.2285 -0.0383 3.1959
-0.0619];

y=[0.8117 0.5402 0.3846 0.9802 1.0775 0.6094 0.5418 0.7352
0.3665];

I want Matlab to close the polygon and then plot the surface inside using
just one color.

Using -fill- it doesn't work because Matlab draws rectangles, so you can't
understand anything, I have also tryed defining z=ones(100,100) and then using
- surf(x,y,z) - but I get lots of rectangles.

I just want a normal surface, I mean 1 figure with his color, that's all. Is it
so difficult ? :-(((