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!