YNodeVarray
(read only)
This property returns a complex array of actual node voltages in same order as SystemY matrix.
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 voltages obtained after solving
myYV = DSSCircuit.YNodeVarray;
mySize = size(myYV);
% Formats the voltages vector as a complex and polar vectors
myVCmplx = [];
myVPolar = [];
for a = 1:2:mySize(2),
cmplxNum = myYV(a)+ i*myYV(a + 1);
myVCmplx = [myVCmplx;cmplxNum];
myVPolar = [myVPolar;[abs(cmplxNum),angle(cmplxNum)*180/pi]];
end;