Matlab String Array To Number Array Javascript Iterations In Maths