syntax errors symbolic to logical
1 次查看(过去 30 天)
显示 更早的评论
I am trying to do a backtracking line search algorithm for a stepest decent problem. This bascial means I need to keep using the gradiant and eventually the hessian alot. But I am trying to compare the operators to be able to compare and I just cant get it. below is my code and a photo of what i am trying to do.
0 个评论
采纳的回答
Walter Roberson
2020-12-4
You missed the point that requires that the gradient of f be evaluated at x. You are taking the symbolic gradient of f into gf, but you are not evaluating it at x.
Note: if you have a symbolic gradient gf, then you do not need to re-calculate it every iteration: you can calculate gf once and evaluate gf with the current x at every step.
5 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!