clear close all x = linspace(0,1,21)'; for i = 1:length(x) Q(i) = integral(@prob3fun,0,x(i)); end Q = Q(:); Qtotal = Q(end); ystar = [0.17 0.46 0.83]*Qtotal; xstar(1) = invinterp(x,Q,ystar(1)); xstar(2) = invinterp(x,Q,ystar(2)); xstar(3) = invinterp(x,Q,ystar(3)); figure(1) hold on plot(x,Q,'r-') plot(x,Q,'bo') plot(xstar,ystar,'k*')