フィルターのクリア

Finding gradient in MATLAB

2 ビュー (過去 30 日間)
Ba Ba Black Sheep!
Ba Ba Black Sheep! 2017 年 1 月 4 日
編集済み: Star Strider 2017 年 1 月 4 日
If the gradient of
100*(y - x^2)^2 + (1 - x)^2
is,
[-400*(y - x^2)*x - 2*(1 - x); 200*(y - x^2)]
what would be the gradient of
(1 - x + a)^2 + 100*(y - b - (x-a)^2)^2;

採用された回答

Star Strider
Star Strider 2017 年 1 月 4 日
編集済み: Star Strider 2017 年 1 月 4 日
syms a b x y
J = jacobian( (1 - x + a)^2 + 100*(y - b - (x-a)^2)^2, [x,y])
G = gradient( (1 - x + a)^2 + 100*(y - b - (x-a)^2)^2, [x,y])
J =
[ 2*x - 2*a - 200*(2*a - 2*x)*(b - y + (a - x)^2) - 2, 200*y - 200*b - 200*(a - x)^2]
G =
2*x - 2*a - 200*(2*a - 2*x)*(b - y + (a - x)^2) - 2
200*y - 200*b - 200*(a - x)^2

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeProblem-Based Optimization Setup についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by