how to draw multiple surfaces
Afficher commentaires plus anciens
Hello, i would appreciate if someone knows how to draw multiple (several) surfaces in one figure (only one surface is created using the command "surf(x,y,z)") ? also how to draw a surface and a line in the same figure ? i guess this is related with combining-joining two (several) objects in one figure ... ? Thanks.
Réponses (2)
Andrei Bobrov
le 14 Déc 2011
e.g.
sf1 = @(X,Y)sqrt(4*X.^2+3*Y.^2);
sf2 = @(X,Y)sqrt(X.^2+Y.^2);
[X,Y]=ndgrid(-2:.1:2,-2:.1:2);
figure
surf(sf1(X,Y));
hold on
surf(sf2(X,Y));
Jan
le 14 Déc 2011
Another approach is creating the AXES object by:
AxesH = axes('NextPlot', 'add');
The default is 'NextPlot'='replace' such that inserting a new object delete already created objects.
Catégories
En savoir plus sur Graphics Object Properties dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!