3D plot isocolor
Show older comments
Hi,
I’m new to matlab and I am trying to make a 3D plot of an equation created from experimental design 3^2 modelling determined from leaching experiments to show the optimisation direction.
The equation is Metal Extraction =1.95+(0.94/2)*A+(0.13/2)*B+(0.40/2)*AC
Where A can be x, B can be y and C can be z.
I have read a few answers and tried isocolors to get a plot using the example from tutorial page, which works for values 1 to 20, but when I use the values from -1 to 1 it comes up with a blank plot.
Could someone please help me in graphing my equation.
[x,y,z] = meshgrid(-1:1,-1:1,-1:1);
data = 1.95+(0.94/2).*x+(0.13/2).*y+(0.40/2).*x.*z ;
cdata = smooth3(rand(size(data)),'box',7);
p = patch(isosurface(x,y,z,data,10));
isonormals(x,y,z,data,p)
isocolors(x,y,z,cdata,p)
p.FaceColor = 'interp';
p.EdgeColor = 'none';
view(150,30)
daspect([1 1 1])
axis tight
camlight
lighting gouraud
I have plotted the equation in excel, but I have to make one variable equal to 1 to get any graphs.
Thanks for the assistance.
Accepted Answer
More Answers (0)
Categories
Find more on Surface and Mesh Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!