YscMatrix
(read only)
This property returns a complex array of Ysc matrix column by column for the active bus.
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;
% Compile a model
DSSText.Command = 'Compile C:\myPath\myModel.dss';
DSSActiveBus = DSSCircuit.ActiveBus;
DSSText.Command = 'Solve mode=fault';
% Sets bus "myBus" as the active Bus
DSSCircuit.SetActiveBus('myBus')
myYscM = DSSActiveBus.YscMatrix;
mySize = DSSActiveBus.NumNodes;
myCMatrix = [];
%Recreate the matrix
for i=1:mySize,
myRow = [];
%Creates the row
for k=1:2:(mySize * 2),
myRow = [myRow, complex(myYscM(k),myYscM(k + 1))];
end;
myCMatrix = [myCMatrix; myRow];
end;