Optimize the design of event-related fMRI

This Matlab script will optimize the timing of the stimulus presence based on specified constraints (e.g., the TR of fMRI acquisition, the duration of the experiment, the minimal inter-stimulus-interval allowed, etc). The output can be either a text file or a Matlab data (.mat) file, either one of which can be further exported to other stimulus presentation software, such as Presentation or E-PRIME.