
ActiveX call (VB to Matlab) executed but doesn't return...sometimes
I have a VB app running from the IDE in Win95 that calls Matlab for some
{*filter*} number work. The code is essentially:
Dim Matlab as Object
Dim Result as String
Set Matlab = CreateObject("Matlab.Application")
Result = Matlab.Execute("myMatlabFile")
The program has worked for 10 months, and in December started{*filter*}
intermittently. I can tell from the Matlab code that it executes the
last line of myMatlabFile (save filename), yet I don't get a Result.
Rebooting fixes the problem, although it shows up every 20 or so runs.
I did a similar test using an Excel Macro to call Matlab, something like
for i=1 to 40
Call Matlab.Execute("fprintf('%d',i);")
end
and again, sometimes the macro hung (at iteration 18-22), other times it
ran flawlessly.
Any clues are welcome and appreciated, please email to the address
below. My clients are killing me!!!
Thanks and best wishes