Javascript Dynamically Create Array Matlab Tutorial Point