MATLAB: Plotting sphere and rectangle mesh meshrectanglesphere need help on plotting something like this : any idea ? Best Answer sphere(20)axis squareYou can get the coordinates x,y and z[x,y,z]=sphere(20)You can plot a spheresurf(x,y,z) Related SolutionsMATLAB: I am trying to create a surface plot with nested loops and am getting the error “Z must be a matrix, not a scalar or vector.” Try something like the following (z must be a matrix):for m = 1:10 x(m) = m; for n = 1:10 y(n) = n; z(m,n) = n+m; endendsurf(x,y,z) MATLAB: Plane y=x % plane z=x,figurehold onfsurf(@(x,y) x)% plane z = yfsurf(@(x,y) y)view(3) Related QuestionExtract Plot3 intersection with y=0 planeMonte Carlo Two Overlapping Spheres
Best Answer