Rmatrix
(read/write)
This property gets/sets resistance matrix, lower triangle, ohms at base frequency for the active reactor in the active circuit.
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;
DSSSolution = DSSCircuit.Solution;
DSSRc = DSSCircuit.Reactors;
% Compile a model
DSSText.Command = 'Compile C:\myPath\myModel.dss';
DSSSolution.Solve;
% gets the number of reactors within the active circuit
NumRX = DSSRc.Count;
% gets the name of the first reactor in the model (if any)
Idx = DSSRc.First;
myName = DSSRc.Name
% gets the Rmatrix of the active reactor
myRmat = DSSRc.Rmatrix;
% Sets the Rmatrix of the active reactor with junk values
feature('COM_SafeArraySingleDim',1);
a = [1 2 3 4 5 6];
b = a';
DSSReactor.Rmatrix = b;
feature('COM_SafeArraySingleDim',0);
% The Rmatrix is set, read again
myRmat2 = DSSRc.Rmatrix;