AllBusVolts
(read only)
This property returns a complex array of all bus, node voltages from most recent solution.
Example
% Create DSS object
DSSObject = actxserver('OpenDSSEngine.DSS')
if ~DSSObject.Start(0),
disp('Unable to start openDSS');
return
end;
DSSText = DSSObject.Text;
DSSCircuit = DSSObject.ActiveCircuit;
% Gets the voltages for all the nodes in the model
myNodes = DSSCircuit.AllNodeNames;
myVolt = DSSCircuit.AllBusVolts;
mySize = size(myVolt);
myVMagAng = [];
% Translates the complex values into polar pairs (magnitude, angle)
for i = 1:2:(mySize(2) - 1),
myVMagAng = [myVMagAng;[abs(myVolt(i) + j*myVolt(i + 1)),angle(myVolt(i) + j*myVolt(i + 1))*180/pi]];
end;
% Links the node names to the polar values
myVoltMat = [];
for i = 1:size(myNodes),
myVoltMat = [myVoltMat;[myNodes(i),num2str(myVMagAng(i,1)),num2str(myVMagAng(i,2))]];
end;