errors with quiver!
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello there,
...hopefully my intentions with the input below is understood. What exact changes should I consider with line 4 or 5? There's always an error issue here. Thanks, I'm new to this.
spacing = 0.2;
[X,Y] = meshgrid(-2:spacing:2);
Z = X.*exp(-X.^2 - Y.^2);
[DX,DY,DZ] = gradient(Z,spacing);
quiver(X,Y,Z,DX,DY,DZ)
hold on
contour3(X,Y,Z)
axis equal
hold off
0 Kommentare
Antworten (1)
KSSV
am 19 Jun. 2022
spacing = 0.2;
[X,Y] = meshgrid(-2:spacing:2);
Z = X.*exp(-X.^2 - Y.^2);
[DX,DY] = gradient(Z);
quiver(X,Y,DX,DY)
hold on
contour(X,Y,Z)
axis equal
hold off
Siehe auch
Kategorien
Mehr zu Vector Fields finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!