- if the calculations involve random numbers. The random number use might not always be obvious: for example although it is not immediately obvious, kmeans() by default uses random initialization of cluster locations;
- if you have some kind of accumulation of results and your code forgets to explicitly initialize the variables;
- if your code relies upon expanding an array and your code does not remember to initialize the array. For example if you have code like A(end+1) = calculation; B = sum(A); then if the code does not remember to clear / truncate the array A then the second time you would be calculating based on results stored the first time through.
recalculation with different rsult respect to previous one
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear all.
Can any one help me about my problem in Mathlab code as following? I have obtained a result and drawn a plot . But, the problem is once I want to do, once again, THE SAME calculations with THE SAME INPUT PARAMETERS, I get DIFFERENT plot. It is very strange and confusing.
0 Kommentare
Antworten (1)
Walter Roberson
am 21 Mär. 2023
This can happen for a couple of different reasons:
5 Kommentare
Walter Roberson
am 24 Mär. 2023
Bearbeitet: Walter Roberson
am 24 Mär. 2023
You did not send thue() or fib_bin() or rt_coefficient_te() or rt_coefficient_tm()
Saying
in one category you can put A=0; alpha=1.08, beta=1.86
in another category you can put A=0.2, alpha=1.01, beta=1.95
does not give me enough information about how the code should be run, or what should be plotted, or what I should be looking for when you say the second run returns different results.
Siehe auch
Kategorien
Mehr zu Scatter Plots finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!