MATLAB: Can we determine input varibles accuracy in genetic algorithm

genetic algorithm

hello dears,
I'm using genetic algorithm in matlab and i have two input variables (they are temperatures). I want the variables have the exact accuracy of 0.1. Is this possible?

Best Answer

You can round the numbers to one decimal place like this.
round(x*10)/10
Also note the 2nd optional input to round() since r2014b.