New MATLAB method