Implementation of HSVGen Algorithm in Matlab