MATLAB: Building a surface plot MATLABsurface Please would someone be willing to help me build a surface plot based on this code: a = 5b = 6x = 1:a;y = 1:b; where z = sin(x/a)*sin(y/b) Best Answer [X, Y] = meshgrid(x, y);z = sin(X ./ a) * sin(y ./ b);surf(x, y, z) Related SolutionsMATLAB: Help to plot a Surface plot of: z = y sin x – x cos y [X,Y] = meshgrid(-5:.2:5);Z = Y .* sin(X) - X .* cos(Y);surf(X,Y,Z) MATLAB: Building cylinder using isosurface I would try using a functiontest = @(x) abs( cos(4*x) );[x,y,z] = meshgrid(-1:.02:1);blob = z <= 0 & z >= -1 & x.^2 + y.^2 <= ... sqrt(0.18*test(z)) & x.^2 + y.^2 >= ... sqrt(0.12*test(z));In this way you will get a wobbly thing depending on the z coordinate. Related QuestionPlotting the given Trigonometric functionsHow to plot meshgrid and meshHelp plotting with simple linespace and surfBuilding legends with extraordinary properties
Best Answer