Postgresql Index Array Function Matlab