What is the purpose of the input argument 'Tolerance' in the risetime function?
Show older comments
The function 'risetime' has an optional input argument 'Tolerance' that as far as I can tell has no affect on the functionality.
In the code below I load some step data and then call the function with and without the 'Tolerance' argument. This gives me the same answer. I also call the function with the 'Tolerance' argument but without the 'PercentReferenceLevels' argument. Since the functions defaults to the values [10, 90] this also gives me the same answer.
load('Step_data.mat')
tol = 1; % User defined tolerance
ipt = findchangepts(Step_data(:,2)); % Find step change index
% Find statelevels
Q1 = Step_data(ipt-1,2);
Q2 = Step_data(ipt,2);
Statelvls = sort([Q1,Q2]);
% Call the function with and without the 'Tolerance' input argument
[Reac_t_1, Reac_l_t_1, Reac_u_t_1, Reac_ll_1, Reac_ul_1] = risetime(Step_data(:,3),'StateLevels',Statelvls,'PercentReferenceLevels', [10,90],'Tolerance',tol);
[Reac_t_2, Reac_l_t_2, Reac_u_t_2, Reac_ll_2, Reac_ul_2] = risetime(Step_data(:,3),'StateLevels',Statelvls,'PercentReferenceLevels', [10,90]);
[Reac_t_3, Reac_l_t_3, Reac_u_t_3, Reac_ll_3, Reac_ul_3] = risetime(Step_data(:,3),'StateLevels',Statelvls,'Tolerance',tol);
My understanding of this function is that it is picking the points marked with crosses in the attached graph. These two points are defined by the input argument 'PercentReferenceLevels', so why the need for a 'Tolerance' input argument? What extra info could this provide to the function that would affect its output?
Accepted Answer
More Answers (0)
Categories
Find more on Descriptive Statistics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


