Matlab Add All Values In Array Javascript Push Function In Vector