This property converts magnitude, angle in degrees to a complex number. Returns Variant array of two doubles.


% Create DSS object

DSSObject = actxserver('OpenDSSEngine.DSS')

if ~DSSObject.Start(0),

                    disp('Unable to start openDSS');



DSSText = DSSObject.Text;

DSSCircuit = DSSObject.ActiveCircuit;

% Loads the complex math lib

DSSCmathLib = DSSObject.CmathLib;

% Converts vector 1 angle 2 (deg) into complex

myResult = DSSCmathLib.pdegtocomplex(1,2);

disp(num2str(myResult(1) + i*myResult(2)));