Store input values in a memory at a given position
[sim, out] = ld_collectValues(sim, events, in, WriteIndex, memorysize, DefaultVal, inVecsize )
in * - input vector whose values shall be stored
out *(memorysize) - the vector representing the memory
WriteIndex * INT32 - the index to write the data to; starts at 1
memorysize - storage size
DefaultVal - initialize the storage with this value
vecsize - size of the input vector