MATLAB: How to Plot 3 variable into a Surface (3D) 3d plotsMATLABplot Suppose I have 3 variables a,b,c.Now 'a' depends on both 'b' & 'c'.How to plot 'a' with the variations of 'b' & 'c'. a = function(b,c). **note = dimensions of a,b,c are (1,n). Help Please! Best Answer clc; clear all ;x = -4:1:4; % The range of x values.y = -4:1:4; % The range of y values.[X,Y] = meshgrid (x,y); % This generates the actual grid of x and y values.% Generating the Z DataZ=Y.^2+X.^2; % The function we're plotting.figure(1); % Generating a new window to plot in.surf(X,Y,Z) % The surface plotting function. Related SolutionsMATLAB: 3d plot help data=[1,1,1 ; 2,2,2 ; 3,3,3; 4,4,4] x=data(:,1);y=data(:,2);z=data(:,3);figurescatter3(x,y,z,100,z,'filled') MATLAB: How to plot meshgrid and mesh Remove last line. Related QuestionHow to plot function with conditions (3d)Intersection mesh plot (3D)Calculating the normal of a (3D) lineFitting a curve (3D) to pointcloud data
Best Answer