Stimulus display code - includes PKM and matlab