x = [ 2 5 6 1 2 9 6 3 0 2 1 9 3 5 2 ]; what is the minimum number of elements in "x" would need to change in order to satisfy "iqr(x) > 20"? a) 15 b) 4 c) 1 in matlab
main.m
x = [256129630219352];
num_changes = length(x) - nnz(x > (quantile(x, 0.75) + 1.5*iqr(x))) - nnz(x < (quantile(x, 0.25) - 1.5*iqr(x)));
if num_changes > 20disp("iqr(x) > 20 is satisfied");
elsedisp("iqr(x) > 20 is not satisfied");
end
260 chars
9 lines
The minimum number of elements in "x" that would need to change in order to satisfy iqr(x) > 20 is 4.