An optimization framework for constructing linear dipole antenna arrays written in MATLAB