MATLAB: 3D surface (sine wave) sine wave Hello, How can I create 3D surface (sine wave)and plote it? Thank you very much Best Answer One possibility is to use the following:k1 = 1; %how many times you want wave to oscillate in x-dirk2 = 0; %how many times you want wave to oscillate in y-dir[X,Y] = meshgrid(linspace(-pi,pi));Z = cos(k1*X).*cos(k2*Y);Change k1 and k2 for fun. Related SolutionsMATLAB: Plotting two variable equation This will generate a 3D surface plotx = -5:0.1:5; % specify the range of x and yy = -5:0.1:5;[X, Y] = meshgrid(x, y);wave = sin(3*X) - Y.^3;surf(X, Y, wave); MATLAB: How to plot cos(x) + cos(y) + cos(z) = 0 Try fimplicit3()fimplicit3(@(x,y,z) cos(x) + cos(y) + cos(z)) Related QuestionPlot the simple sin wave with amplitudeHow do i get the graph plottedHelp to plot a Surface plot of: z = y sin x – x cos y
Best Answer