displaying symbolic gradient and divergence of vectors and tensors

4 ビュー (過去 30 日間)
Alex
Alex 2019 年 4 月 17 日
回答済み: RICARDO DE BRAGANCA 2019 年 10 月 20 日
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?

回答 (1 件)

RICARDO DE BRAGANCA
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)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by