New MATLAB methods with implementation of Java