Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (11 sloc) 334 Bytes
function iqr_value = iqrVal(x)
y = sort(x);
% compute 25th percentile (first quartile)
q(1) = median(y(find(y<median(y))));
% compute 50th percentile (second quartile)
q(2) = median(y);
% compute 75th percentile (third quartile)
q(3) = median(y(find(y>median(y))));
% compute Interquartile Range (IqR)
iqr_value = q(3)-q(1);
end
You can’t perform that action at this time.