% DQUANPLOT file dquanplot.m Plot of quantile function for a simple rv % Version of 7/6/95 % Uses stairs to plot the inverse of FX X = input('Enter VALUES for X '); PX = input('Enter PROBABILITIES for X '); m = length(X); F = [0 cumsum(PX)]; XP = [X X(m)]; stairs(F,XP) grid title('Plot of Quantile Function') xlabel('u') ylabel('t = Q(u)') hold on plot(F(2:m+1),X,'o') % Marks values at jumps hold off