フィルターのクリア

matrix value in broyden's method

3 ビュー (過去 30 日間)
ZhenQi
ZhenQi 2013 年 4 月 18 日
Ok guys, for the iteration part of my broyden's method I have:
temp = x;
x = x - jac(x)\f(x);
s = x - temp;
y = f(x) - f(temp);
jac(x) = jac(x) + (y - jac(x)*s)*s'/(s*s);
now when I run this I get an error saying:
Error using * Inner matrix dimensions must agree. Error in broyden (line 32) jac(x) = jac(x) + (y - jac(x)*s)*s'/(s*s);
anyone know why this doesn't work?
  1 件のコメント
ZhenQi
ZhenQi 2013 年 4 月 18 日
never mind I got it to work

サインインしてコメントする。

回答 (1 件)

Andrei Bobrov
Andrei Bobrov 2013 年 4 月 18 日
編集済み: Andrei Bobrov 2013 年 4 月 18 日
jac(x) = jac(x) + (y - jac(x)*s)*s.'/(s(:).'*s(:));
or
jac(x) = jac(x) + (y - jac(x)*s)*s.'/norm(s).^2;

カテゴリ

Help Center および File ExchangeOperating on Diagonal Matrices についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by