Min / Max of a vector (finds the first appearance of the minimum/maximum)
[sim, index, value] = ld_vector_minmax(sim, events, in, findmax, vecsize)
Function is buggy somehow. Find maximum should work. Minimum perhaps not!
in *+(vecsize)
findmax greater than 0 means "find the maximum"
index * - the index starting at 1, where the max / min was found
value * - min/max value