MATLAB: How can i 3d plot z=x*y 3d plots I tried this but didn't work [x,y]=meshgrid(-5:5) z=x*y Plot3(x,y,z) Best Answer Try this:z = x .* y;You need to do ‘element-wise’ multiplication, and adding the ‘dot operator’, changing (*) to (.*). will do this.See the documentation on Array vs. Matrix Operations (link) for details. Related SolutionsMATLAB: Z=xy perhaps you means an element-wise multiplication?z = x.*y;what you're doing above is a matrix multiplication from linear algebra. MATLAB: Plane y=x % plane z=x,figurehold onfsurf(@(x,y) x)% plane z = yfsurf(@(x,y) y)view(3) Related QuestionHow to plot a meshFind value of a constant given a value of z(x,y)Result of z+conj(z) and z*conj(z) with z complex by defaultInverse z-Transform
Best Answer