# Another Matlab Problem

1. Jan 20, 2008

### JoshHolloway

I want to graph the equation $$z = x^{2} + (xy)$$ in matlab, but I cant figure out how to do it.

Here is the code I am trying:

EDU>> [X,Y] = meshgrid(-10:.5:10);
EDU>> Z = X.^2 + X. * Y.;
EDU>> mesh(X,Y,Z, 'EdgeColor', 'black')

What am I doing wrong?

2. Jan 21, 2008

### JoshHolloway

Anyone?

3. Jan 21, 2008

### mda

What makes you think you're doing something wrong?

I can see one syntactical mistake (X. * Y.; should be X.*Y;) but otherwise it looks ok