X =['enter an array>']; m = length(x); Sum = 0; For i = 1:m Sum = sum + X(i); end Disp(sum). IF you want single sum. It you wish iterations remove semicolon ...
確定! 回上一頁