Problem with fsurf (where is the controur?)
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Rene Wells
il 17 Mag 2019
Commentato: Walter Roberson
il 18 Mag 2019
using:
f = @(x,y) (x^0.3)*(y^0.3)
fsurf(f,[0,10],'ShowContours','on')
but I do not seem to get the countour below the surface, only the surface. Why?
0 Commenti
Risposta accettata
Walter Roberson
il 17 Mag 2019
When I try in R2019a, the contour is there, but you need to rotate the plot to see it as it is underneath the surface.
2 Commenti
Walter Roberson
il 18 Mag 2019
surface plots are not compatible with gaps.
You can draw a surface plot and contour3() on top of it. That would require that you create a grid of function values to contour3()
You could fsurf() and set the Alpha (transparency) of it fairly low so that you could see the contour lines underneath.
f = @(x,y) (x.^0.3).*(y.^0.3);
[X,Y] = meshgrid(linspace(0,10));
Z = f(X,Y);
surf(X, Y, Z, 'edgecolor', 'none')
alpha 0.5
hold on
contour(X, Y, Z);
hold off
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Surface and Mesh Plots in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!