is it possible to to set the tolerance used by the SDI programatically? for example,assuming i have some .mat files called alldata_b, and alldata from separate simulink runs.
runID5 = Simulink.sdi.createRun('alldata_b','file','alldata_b');runID6 = Simulink.sdi.createRun('alldata', 'file','alldata');diffSDI_tmp = Simulink.sdi.compareRuns(runID5, runID6);% Number of comparisons in result
cntSigCmp_tmp = diffSDI_tmp.count;% Iterate through each result element
for i = 1:cntSigCmp_tmp % Get signal result at index i
sigDiff_tmp = diffSDI_tmp.getResultByIndex(i); sigNam_tmp = Simulink.sdi.getSignal(i); % create the object first
sigNam_tmp = sigNam_tmp.signalLabel; % get the object from the object
sigDiff_tmp.tol = 1;end
the line "sigDiff_tmp.tol = 1;" gives the following result:
You cannot set the read-only property 'tol' of DiffSignalResult.Error in <my_script> (line X) sigDiff_tmp.tol = 1;
does this mean the only way to change the tolerance is by editing in the SDI? is there no way around this?
Best Answer