displaying symbolic gradient and divergence of vectors and tensors
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
RICARDO DE BRAGANCA
2019-10-20
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!