function x = str2num(s)
%STR2DOUBLE Convert opaque string object to MATLAB double.

%   Copyright 1984-2000 The MathWorks, Inc. 
%   $Revision: 1.1 $ $Date: 2000/06/20 21:00:22 $

x = str2double(fromOpaque(s));

function z = fromOpaque(x)
z=x;

if isjava(z)
  z = char(z);
end

if isa(z,'opaque')
 error(sprintf('Conversion to char from %s is not possible.', class(x)));
end
