I've written a configuration selection code based on genetic algorithm. Now when i'm running it on different platforms like 2015a and 2016a it gives different answers. In my code I've repeated the algorithm 100 times so that no discrepancy occurs.
Show older comments
The code is giving different answers when executed in different MATLAB versions, i.e., 2015a and 2016a. I think the problem is occurring due to the rand function which has been used in it, but I'm not sure.
7 Comments
Birdman
on 28 Feb 2018
Your code?
Jan
on 28 Feb 2018
If you use rand() you should expect the results are different. So why do you assume something else?
Asifuz Zaman
on 28 Feb 2018
What does this mean: "In order to avoid discrepancies, I run the code for 100 iterations"? Discrepancies between what?
Without seeing the code, there is no chance to find out, which part might be influenced by different Matlab versions. Do the reply change for different runs on the same machine and Matlab version?
Asifuz Zaman
on 1 Mar 2018
John D'Errico
on 1 Mar 2018
Nobody can answer a question where only a vague (and confusing) set of comments are made about what you did. If you seriously want help, then you need to show exactly what you are doing. You need to explain clearly what you perceive to be the problem.
Answers (0)
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!