Matlab Add All Values In Array Javascript Concat