This dataset is intended to support the findings of the publication "On optimizing the sensor spacing for pressure measurements on wind turbine airfoils" by Fritz, Kelley and Brown (2024). The dataset contains a Matlab routine that runs the pressure sensor optimization for the FFA-W3-241 airfoil based on a genetic algorithm as well as a sequential quadratic programming optimization routine. It imports results of the widely used code XFOIL as input. Results are compared against a cosine sensor spacing. This script aims to provide a simplified overview of how these optimization routines are implemented in Matlab and how the results can be interpreted.