keeps getting same values when running simulated annealing

2 次查看(过去 30 天)
Please I need to how I can stop getting the same random numbers of parameters when I am running the SA. Also, at a point, i get error after running a full iteration which makes it impossible to re-estimate my parameters. Why do I keep getting the same parameters during each iteration? why is the output no changing? Is there any other way of estimation?

回答(2 个)

Walter Roberson
Walter Roberson 2013-11-22
The default is that you would not get the same outputs each time. Are you using the tool to set the parameters? I have not looked at the options in the tool.
  4 个评论
Victor
Victor 2013-11-22
Index exceeds matrix dimensions. This is the error it shows plus others that points to my code. But once I change the parameters back to its original value, it starts iterating again.
Walter Roberson
Walter Roberson 2013-11-23
At the command line, give the command
dbstop if caught error
and then run your program. When it stops, look through the size() of the various variables and expressions. Work backwards to figure out whether the problem is with a value of the wrong size being passed in, or due to a calculation not returning as many values as expected. If it is due to something of the wrong size being passed in, use dbup to go up a stack frame and look at the expression that was passed in that position; trace the expression back up through, using dbup as needed until you find a place where a calculation is not returning the expected size or you have gotten all the way back to the values you supplied.
For us to assist you, we would need to full trace of the error, such as the lines that indicate which line of which routine you were executing in, and what the text of that line is, and which line of which routine called it and the text of that line, and so on, right back to your code.

请先登录,再进行评论。


Victor
Victor 2013-11-23
Like I told you, I know what causes the error. The problem I am facing is that x does not change in SA. The SA code is running another file which re-estimates my parameters, this seperate code gives different output but the x doesn't change.
  3 个评论
Victor
Victor 2013-11-23
please stop asking me annoying questions. Thank you for your attempt to help
Walter Roberson
Walter Roberson 2013-11-26
You have not shown us the code, you have not shown us the error traceback, and you appear to be declining to answer questions that might help us to debug your difficulties. Have you solved the problem now, or have you given up on it, or are you hoping that someone might read your mind?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Simulated Annealing 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by