I can't use function min And here is my code
x = rand([4,3])for i = 4; row = 0; for j = 1:3 if x(i,j) >=0 row = row + x(i,j); end end fprintf('The row %d is %d\n',i,row)end
The answer displayed 'The row 4 is 2.245814e+00' What's wrong with my code? Can anyone help me out? thanks
Best Answer