Try:
Given a filename, it will produce a JP2 tempfile in the current directory.
It may require some adjustment depending on the contents of the file and how you want to handle the output, but I don't have any files to test.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!