prepareData function

Prepare input data to be used in active set algorithm