MATLAB: How to plot a quadratic equation 3d plotsplottingsurface Hello everybody! I've been struggling with this for a while and I don't know how to do that.. I would like to plot this: x²+y²+z²-2xy-4x+4y-1=0 thanks for your help! Best Answer Hello,If you have a newer release of Matlab (I believe R2016b), you can use the new fimplicit3 function,fimplicit3(@(x,y,z) x.^2+y.^2+z.^2-2*x.*y-4*x+4*y-1)which will default to plotting on the interval [-5,5] (for all axes) but you can change this interval with the second input argument.Hope this helps! 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: Plotting an ellipsoild with an equation that is not set equal to one variable Did you look up ellipsoid in the help? When or if you do, you'll find your answer with very very slight modifications to their demo:[x, y, z] = ellipsoid(0,0,0, 2,3,1, 30);surfl(x, y, z)colormap copperaxis equal Related QuestionPlot solutions to a multi variable system: x + 2y + 3z = 4How to plot quadratic equation with 2 variableHow do i plot x^2 +4y^2 +9z^2 = 1Plus-minus function surf graphHow to plot function with conditions (3d)
Best Answer