Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

A question about plotting 3D mesh! Hope it's not a stupid one!

Status
Not open for further replies.

Difan

Computer
Jul 24, 2006
1
I am using Matlab 7.1 Neural Network toolbox. I built up a network to simulate a function. Actually I think my quesion doesn't do much about the toolbox.

I have two variables x and y. They are all 1*101 vectors.

x=[-250:2.5:0];
y=[0:0.01:1];

Then I use the network (function) to calculate a z, which is also a 1*101 vector. This part is working well. In case you want to know, it is listed here:

z=@(x,y)[1 0 0]*poststd(sim(neta,trastd([x;y],meanp,stdp)),meant,stdt)

(Here the [x;y] must be inputed as a 2*101 matrix. I think maybe it's the problem.)

Then when I failed on plotting a 3D mesh with following commands:

Z=griddata(x,y,z,X,Y);
mesh(X,Y,Z);

I also tried [X,Y,Z]=meshgrid(x,y,z); and it doesn't work too.

However, ezsurf(z) work well.

Does anyone know why?

Thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor