MATLAB: How to plot and combine in one graph matlab functionmultivariable functionsplotting mutivariate functions Hello everyone; Need help in plotting all these three functions on a single graph. U=nthroot(1-x^3-y^3-z^3,3) V=nthroot(1-x^2-y^2-z^2, 2) W=(1-x-y-z) Thanks Best Answer Since you have 3 independent variables, you will need to use slice() and create 3 figures.[X, Y, Z] = meshgrid(-0.5:0.02:0.5);U = nthroot(1-X.^3-Y.^3-Z.^3, 3);V = nthroot(1-X.^2-Y.^2-Z.^2, 2);W = (1-X-Y-Z);figureslice(X, Y, Z, U, [-0.4 0 0.3], 0, 0.3)title('U')colorbarshading interpfigureslice(X, Y, Z, V, [-0.4 0 0.3], 0, 0.3)title('V')colorbarshading interpfigureslice(X, Y, Z, W, [-0.4 0 0.3], 0, 0.3)title('W')colorbarshading interp Related SolutionsMATLAB: Slice volume data with X=Y plane Hi,Following code may help,clcclose allclearn = 10;rmax = 10;x = linspace(-rmax,rmax,n);y = linspace(-rmax,rmax,n);z = linspace(-rmax,rmax,n);[X,Y,Z] = meshgrid(x,y,z);V = X.^2 + Y.^2 + Z.^2zslice=0;yslice=[];xslice=[];hslice=slice(X,Y,Z,V,xslice,yslice,zslice);rotate(hslice,[0 1 0],-45);view([1 1]);figureisosurface(V);hold on hslice=slice(X,Y,Z,V,xslice,yslice,zslice);rotate(hslice,[0 1 0],-45);Output:For more information kindly refer to the following link:https://in.mathworks.com/help/matlab/visualize/exploring-volumes-with-slice-planes.html (Exploring volumes with slice planes)https://in.mathworks.com/support/search.html/videos/making-a-sweeping-slice-through-volume-of-data-97258.html?q=&fq=asset_type_name:video%20category:matlab/volume-visualization&page=1 (Demo Video) MATLAB: Draw 3D object.write code in 2016a version. Help me,thanks! x = linspace(0,3) ;y = linspace(0,3) ;[X,Y] = meshgrid(x,y) ;Z = 1-X.^2 ;surf(X,Y,Z)shading interp Related QuestionHow to get a tilted slice in 3-D data4d plotting with slices
Best Answer