This article describes a Wave Field Synthesis (WFS) MATLAB toolbox designed by the authors. The toolbox provides the user with the possibility to create several WFS settings and simulate the resulting wavefront including an optimization algorithm that uses the created parameters to minimize the mean squared error (MSE) in a particular region of the simulation space. The outcome of the optimization provides new driving functions to generate a modified wavefront that meets minimum MSE characteristics.