Array Within Array Javascript Iterations Matlab Drive