Why do NaNs in a cell array not pass correctly when connecting two MATLAB 7.4 (R2007a) sessions via COM automation?

2 views (last 30 days)
In a client session of MATLAB, open up a server:
h = actxserver('matlab.application')
In the server session of MATLAB, create a cell array with a "NaN":
A = { 1 2 NaN }
From the client session of MATLAB, retrieve the cell array with the "GetWorkspaceData" method:
A = h.GetWorkspaceData('A','base')
A{3}
In place of the "NaN" as the third element of the cell array is an error message:
ActiveX VT_ERROR: Parameter not found.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
MATLAB conforms to IEEE specifications for NaN, but this is an exceptional case in which VB does not conform to IEEE 754, but rather issues an error instead.
To work around the issue, either pre-process the NaN's to conform with a COM data type, or post-process the error messages in the client back into MATLAB NaNs.

More Answers (0)

Products


Release

R2007a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!