tags:

views:

212

answers:

4

Anyone had this run-time error in the past? I make use of Excel Link quite extensively with Matlab 2009a. I have a workbook which used to work fine, and now I get this error for every MLGetMatrix call. Note that MLEvalString, MLPutVar and MLGetVar do work as expected. But as soon as a MLGetMatrix is issued, I get this Run-time error, and it is driving me mad as I can't seem to find why! Please, if you met this in the past, could you tell me what is causing it?! Thank you.

Martin

A: 

That 80020009 hex value smells like a COM/ActiveX HRESULT. Some googling yields DISP_E_EXCEPTION = 0x80020009, which doesn't really help other than the fact that it means something has caused a DISP_E_EXCEPTION (which I think is an exception in a COM IDispatch::Invoke() call).

edit: since Excel Link is a Mathworks product maybe you should put in a bug report to them?

Jason S
A: 

Thank you for your input. I contacted Mathworks and I am waiting for an answer. Meanwhile, still trying to figure out what is happening!

Martin Bernier
This should be a comment to Jason S' answer.
Jacob
+1  A: 

Figured it out. I was using the variable name isempty in one of my MATLAB evaluations prior to calling MLGetMatrix (which as we know is also a built-in function). This seems to be the cause of the problem. Changing that variable name to something else solved the problem. The executed code seemed to be running of modifying the Matlab environment, but nevertheless blocked any further attempt at using MLGetMatrix...

Martin Bernier
A: 

hi, did you get an answer from Mathworks? I receive the same error.

Alli

related questions