YCurrents
(read only)
This property returns a variant array of doubles containing complex injection currents for the present solution. It is the "I" vector of I=YV.
Example
% Create DSS object
DSSObject = actxserver('OpenDSSEngine.DSS')
if ~DSSObject.Start(0),
disp('Unable to start openDSS');
return
end;
DSSText = DSSObject.Text;
DSSSolution = DSSCircuit.Solution;
DSSSolution.Solve();
% Gets the Y currents
myYCurr = DSSCircuit.YCurrents;
mySize = size(myYCurr);
% Formats the injection currents vector as a complex and polar vectors
myInjCurrCmplx = [];
myInjCurrPolar = [];
for a = 1:2:mySize(2),
cmplxNum = myYCurr(a)+ i*myYCurr(a + 1);
myInjCurrCmplx = [myInjCurrCmplx;cmplxNum];
myInjCurrPolar = [myInjCurrPolar;[abs(cmplxNum),angle(cmplxNum)*180/pi]];
end;