how to plot the gradient of a equation having specific region?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
hello i have the equation
f(x,y)=-5x^3+4yx+6y^3+1
the gradient with respect to x is
f(x)=-15*x^3+4*y
how to plot the gradient having area
-2<x<2, -2<y<2
0 Commenti
Risposte (2)
Torsten
il 18 Ott 2022
x = -2:0.1:2;
y = x;
[X,Y] = meshgrid(x,y);
f = @(x,y) -15*x.^2+4*y;
surf(X,Y,f(X,Y))
0 Commenti
Star Strider
il 18 Ott 2022
Perhaps this —
syms x y
f(x,y)=-5*x^3+4*y*x+6*y^3+1
Gf = gradient(f,x)
figure
fsurf(Gf, [-2 2 -2 2])
xlabel('X')
ylabel('Y')
.
0 Commenti
Vedere anche
Categorie
Scopri di più su Surface and Mesh Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!