MATLAB: Evan, if I want to return back

genetic algorithmMATLABstring to number

Dear, If I want to return back again the solution in GA which is string to fife numbers after applying it, suppose this is the string, I want to return the points in their position for example
0028023482100090411607002407264000021081060000000698132 to
[28.234821 , 9.411607 , 24.726400 , 21.810600 , 0.698132] don't forgot I deal with fixed matrix [20,5] and in the future it will be with random population
thanks

Best Answer

Disclaimer: Not having experience with GAs myself, I can offer something that will make what you're wanting to do work, but I have no knowledge of how convenient, accurate or efficient it will be for your purposes.
s = '0028023482100090411607002407264000021081060000000698132';
m = reshape(s,11,[])';
v = [str2num(m(:,1:4)) + str2num(m(:,6:end))/1e6]';