value in each iteration
1 回表示 (過去 30 日間)
古いコメントを表示
f=@(x) 0.5*(x(1)-1).^2+10*(x(2)+2).^2-2
miter=10000
and i have loop
for i=1:miter
then,who i can to calculate f(i)-f(i-1)?
6 件のコメント
Walter Roberson
2020 年 9 月 19 日
You cannot. Your gradient descent formula is only valid for functions of one variable.
回答 (1 件)
saja mk
2020 年 9 月 19 日
1 件のコメント
Walter Roberson
2020 年 9 月 19 日
this does not use the epsilon formula from https://www.mathworks.com/matlabcentral/answers/596404-value-in-each-iteration#comment_1015369
参考
カテゴリ
Help Center および File Exchange で Loops and Conditional Statements についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!