MATLAB: Z=xy meshgrid [x,y]=meshgrid(-6:1:6) z=x*y Is not giving the function z=x*y, anybody come across this issues pls? Best Answer perhaps you means an element-wise multiplication?z = x.*y;what you're doing above is a matrix multiplication from linear algebra. Related SolutionsMATLAB: How can i 3d plot z=x*y 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. MATLAB: Plane y=x % plane z=x,figurehold onfsurf(@(x,y) x)% plane z = yfsurf(@(x,y) y)view(3) Related QuestionFind value of a constant given a value of z(x,y)How to plot x^2+z^2=9 above the xy plane and between y=-1 and y=2How to get the product multiplication of element matrix with equal size
Best Answer