MATLAB will allow you to use any existing java classes. Use your Java compiler to produce .class files from your .java files. For MATLAB to see your classes they must be in a directory on MATLAB's classpath (that's classpath, NOT MATLABPATH).

MATLAB's classpath is kept in a file called classpath.txt in your toolbox/local directory (type which classpath.txt at the MATLAB prompt). Add the full path to the directory containing your .class files to this file. Classpath.txt is only read once when MATLAB starts, so changes to it or your .class files require you to restart MATLAB before they will take effect.


Back to Index