MATLAB: The for loop on classification gives every time different value

classificationimage processingimage segmentationMATLAB

I have one code which gives me 3*3 matrix value of classification in image .but when I run this code 2nd time it will change the output value every time. I got something new 3*3 matrix value can any one help me in this.I already submitted my report on this previously generated results now the problem is I have submission on that this values gina differ so please anyone help me in this

Best Answer

Most likely you're calling some function that uses the random number generator. Reset the generator to a fixed seed at the start of each classification using the rng function and see if that provides reproducibility.
Related Question