I'm trying to extract elements from the first column of the following matrix using a for loop [1.0000 1.0000; 0.4401 4.0000; 0.0000 2.0000; 0.0000 3.0000] But I'm getting inaccurate values for the zero ones (example: 6.2421e-010 instead of zero) How to fix this?
Code:
for h=1:K
summation=0;
for i=1:F
x(i,1)
summation=summation+x(i,1);
end
end
codefor h=1:K summation=0; for i=1:F x(i,1) summation=summation+x(i,1); end end - Amira Akra