Path: news.mathworks.com!not-for-mail
From: "Shawn Hershey" <shliabnt@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Matlab callbacks from Java
Date: Mon, 24 Nov 2008 05:41:02 +0000 (UTC)
Organization: Lyric Semiconductor
Lines: 8
Message-ID: <ggdepe$2hu$1@fred.mathworks.com>
Reply-To: "Shawn Hershey" <shliabnt@gmail.com>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1227505262 2622 172.30.248.37 (24 Nov 2008 05:41:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Mon, 24 Nov 2008 05:41:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1326994
Xref: news.mathworks.com comp.soft-sys.matlab:502723


I am currently developing a library for Matlab users at my company.  The functions in the library are such that I hope to write the code in Java or C++ rather than in M.  I have written Java code that is called by Matlab in the past and find it to be a nice interface, but this time I require my library functions make calls back to Matlab (ideally via function handles).  This seems to be possible using C or C++ Mex files, but I was hoping to code in Java, not C/C++.  Google searches haven't yielded any obvious solution.  Is it not actually possible to do something like the following:

1) Make a Java call from matlab
2) From the called Java function, make multiple Matlab calls (either using Matlab function handles, function names, or anything else).

If this is possible, great!  If not, I'm assuming I can do what I want using C/C++ MEX files.

Thanks in advance for your insight.