[0:0.1:1] whys is not exactly 0.1 steps ?
Anyone know why this code does not return verification 1
it seems instead of being 0.1 is actually makaing 0.10000000001
step=0.1;
max_value=1;
array = 0:step:max_value;
array1 = round(0:step:max_value,1);
check=[array’,array1′];
test=[array==array1]’;
% Why not 1 ?
verification=all(test)Anyone know why this code does not return verification 1
it seems instead of being 0.1 is actually makaing 0.10000000001
step=0.1;
max_value=1;
array = 0:step:max_value;
array1 = round(0:step:max_value,1);
check=[array’,array1′];
test=[array==array1]’;
% Why not 1 ?
verification=all(test) Anyone know why this code does not return verification 1
it seems instead of being 0.1 is actually makaing 0.10000000001
step=0.1;
max_value=1;
array = 0:step:max_value;
array1 = round(0:step:max_value,1);
check=[array’,array1′];
test=[array==array1]’;
% Why not 1 ?
verification=all(test) resolution MATLAB Answers — New Questions