フィルターのクリア

How can I calculate the gradient of a vector in MATLAB?

3 ビュー (過去 30 日間)
Sergio
Sergio 2024 年 4 月 27 日
回答済み: Star Strider 2024 年 4 月 27 日
I have
The vector r, which is a 1x8 vector,
r=(r_1, r_2,…,r_8)^T,
and the Jacobian defined by J, as a 8x8 matrix
J = (\partial r_1/partial k_1 \partial r_1/partial k_2
\partial r_2/partial k_1 \partial r_2/partial k_2
\partial r_8/partial k_1 \partial r_8/partial k_2)
and I have F = 0.5 \sum_i r_i^2
How can I find the gradient of F with respect to k?
Thanks

採用された回答

Star Strider
Star Strider 2024 年 4 月 27 日
That depends on how you want to do it.
The Symbolic Math Toolbox has the gradient and jacobian functions.
To do it numerically, use the gradient function.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics and Optimization についてさらに検索

製品


リリース

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by