Matlab flexible physiology acquisition and stimulus generation