×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

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

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

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

(OP)
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!
 

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources