Change the logic of the MATLAB variables needed for simulation