(read/write)


This property sets/gets the X values as a Variant array of doubles. Set Npts to max number expected if setting.


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';

DSSXY = DSSCircuit.XYCurves;

% define new XYCurve

DSSText.Command = 'New XYCurve.SmartInv0 npts=7 xarray=[0.4 0.86 1 1 1 1.14 1.6] yarray=[1 1 0 0 0 -1 -1]';

% activate the first XY curve of the list

i = DSSXY.First;

% get the X values

myXValues = DSSXY.Xarray;

% Set the X values

B = [0.5 0.86 1 1 1 1.14 1.6];

B = B';        % transpose

feature('COM_SafeArraySingleDim',1);  % enable this setting for allow MATLAB to export the array properly

DSSXY.Xarray=B;

feature('COM_SafeArraySingleDim',0);  % Goes back to normal