Why does my for-loop substitute only one value throughout 31 iterations?
显示 更早的评论
Hi all, on the attached file, I am trying to use the for-loop to substitute values for every iteration. However, it seems like the for-loop only substitute one value. What could be the cause of that?
Kind Regards Dursman
3 个评论
Why are you redefining G, H, I, J, K inside the for loop. They are constants so should be defined outside the for loop unless you are expecting them to change. You seem to be telling it to do the same thing every time round the loop. What is supposed to change? You refer to x(i) so I assume you intended to assign something to x(i) rather than just x every time round the loop.
Dursman Mchabe
2018-10-22
Dursman Mchabe
2018-10-22
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!