Program not converging after the first execution

8 次查看(过去 30 天)
I am trying to implement ICP algorithm using MATLAB for point clouds. While running the program for the first time, I am getting the desired results. But when I again execute it, the program seems not to converge and gives undesired outputs. I have to restart matlab every time to see the outputs. Is there any fix for this problem?
All suggestions will be highly appreciated
Thanks
Sandeep

采纳的回答

Andreas Goser
Andreas Goser 2011-12-23
This sounds like there are issues with variables (names) that are used for your calculation, but are also overwritten. Thus different values are used for the second run with different results.
You can verify this by clearing all variables before the second run.
In general, you can debug the code and look at intermediate results and compare first and second run. This will guide to the line(s) causing the issue.
  2 个评论
Walter Roberson
Walter Roberson 2011-12-23
Another possibility would be if the algorithm uses the random number generator and is sensitive to the random stream.
Sandeep Sasidharan
Sandeep Sasidharan 2011-12-25
Thank you....It was the random number generator which caused the problem.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by