% Written by Min-Hua Huang
% June 9, 2011
% Figure 5 of "Indefinite Integration of the Gamma Integral".
% Functional Plots of $-ln(x)$ and ${}^{-1}{{h}_{s}}\left( x \right)$.
clear; clc; format long;
record=ones(791,6)*-999; 
record1=ones(791,6)*-999;
record(:,1)=0.05:0.005:4;
kkk=792;
for i=0.00000001:0.00005:0.051
    record(kkk,1)=i;
    kkk=kkk+1;
end    
record(:,2)=-log(record(:,1)); kk=3; 
for s=1:-0.5:-0.5
    kkk=1;
    for hk=0.05:0.005:4;
        record(kkk,kk)=hinv(hk,s);
        kkk=kkk+1;
    end
    for i=0.00000001:0.00005:0.051
    record(kkk,kk)=NaN;
    kkk=kkk+1;
    end   
    kk=kk+1;
end   
B=sortrows(record,1);
x=B(:,1);
y1=B(:,2);
y2=B(:,3);
y3=B(:,4);
y4=B(:,5);
y5=B(:,6);
plot(x,y1,'-k','LineWidth',2)
hold on
plot(x,y2,'-k+','MarkerSize',3)
plot(x,y3,':k','LineWidth',2)
plot(x,y4,'-.k','LineWidth',2)
plot(x,y5,'--k','LineWidth',2)
hold off
axis([0, 4, -5, 18]);
box off;
shading flat;
xlabel('x');
ylabel('values of -ln(x) and invh(s,x)')
legend('-ln(x)','invh(1,x)','invh(0.5,x)','invh(0,x)','invh(-0.5,x)');
