MATLAB: Plotting a function… MATLABplotting I have the following function that I would like to plot. Gamma = atand((Y)/(X)); Whats the best way to preform this task. Y and X will vary from 0 to 40. Thanks, Best Answer [X,Y] = meshgrid(0:.1:40, 0:.1,40);surf(X, Y, atand(Y ./ X)); Related SolutionsMATLAB: How to plot only certain values in a surface plot Two options: 1. Set Z > 4 to NaN: [X,Y] = meshgrid(-5:.2:5); Z = -0.15*sin(X).*(X) + 0.2*(Y.^2) +3 ;Z(Z>4) = NaN;figuresurf(X,Y,Z)2. Use a zlim cutoff: [X,Y] = meshgrid(-5:.2:5); Z = -0.15*sin(X).*(X) + 0.2*(Y.^2) +3 ;figuresurf(X,Y,Z)zlim([min(zlim) 4])There may also be other possibiloities. MATLAB: 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) Related QuestionHow to plot this figure? please help me.3D plane in MATLAB
Best Answer