displaying symbolic gradient and divergence of vectors and tensors
4 views (last 30 days)
Show older comments
I am looking for a way to calculate the divergence and gradient of vector fields without defining the exact expression for them; I mean getting the answer in the following form:
Is it possible to get such results by MATLAB?
0 Comments
Answers (1)
RICARDO DE BRAGANCA
on 20 Oct 2019
May not be exactly what you want but... you can do:
syms f(x1,x2,x3)
gradient(f)
and you will got:
ans(x1, x2, x3) =
diff(f(x1, x2, x3), x1)
diff(f(x1, x2, x3), x2)
diff(f(x1, x2, x3), x3)
0 Comments
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!