Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Juan Carlos Sihotang

1206237914
Permodelan Numerik

n=1:10;
N=10;
Sn=1-((n-0.3)/(N+0.4))
sigma=[300 310 340 345 350 367 387 400 410 420]
q=log(sigma)
r=-log(log(1./Sn))
disp([Sn' sigma' q' r'])
plot(q,r,'-bd','LineWidth',4,'MarkerEdgeColor','y','MarkerFaceColor','k','MarkerSize',10),
xlabel('ln(sigma)'), ylabel('-ln(ln(1/Sn)'), title ('Survival Probability (Sn)'), grid
f=((N*sum(q.*r))-(sum(q)*sum(r)))/((N*sum(q.^2))-(sum(q))^2)
g=((sum(r))-(f*sum(q)))/N
sigzero=exp(g/(-f))
sigmax=sigzero*((log(1/0.90))^(-1/f))
Fin=exp(-(sigmax/sigzero)^f)

COMMAND WINDOWS :
>> n=1:10;
N=10;
Sn=1-((n-0.3)/(N+0.4))
sigma=[300 310 340 345 350 367 387 400 410 420]
q=log(sigma)
r=-log(log(1./Sn))
disp([Sn' sigma' q' r'])
plot(q,r,'-bd','LineWidth',4,'MarkerEdgeColor','y','MarkerFaceColor','k','MarkerSize',10),
xlabel('ln(sigma)'), ylabel('-ln(ln(1/Sn)'), title ('Survival Probability (Sn)'), grid
f=((N*sum(q.*r))-(sum(q)*sum(r)))/((N*sum(q.^2))-(sum(q))^2)
g=((sum(r))-(f*sum(q)))/N
sigzero=exp(g/(-f))
sigmax=sigzero*((log(1/0.90))^(-1/f))
Fin=exp(-(sigmax/sigzero)^f)

Sn =

Columns 1 through 6

0.9327 0.8365 0.7404 0.6442 0.5481 0.4519

Columns 7 through 10

0.3558 0.2596 0.1635 0.0673

sigma =

300 310 340 345 350 367 387 400 410 420

q=

Columns 1 through 6

5.7038 5.7366 5.8289 5.8435 5.8579 5.9054

Columns 7 through 10

5.9584 5.9915 6.0162 6.0403

r=

Columns 1 through 6

2.6638 1.7233 1.2020 0.8217 0.5086 0.2304

Columns 7 through 10

-0.0329 -0.2990 -0.5940 -0.9927

0.9327 300.0000 5.7038 2.6638


0.8365 310.0000 5.7366 1.7233
0.7404 340.0000 5.8289 1.2020

0.6442 345.0000 5.8435 0.8217


0.5481 350.0000 5.8579 0.5086
0.4519 367.0000 5.9054 0.2304
0.3558 387.0000 5.9584 -0.0329
0.2596 400.0000 5.9915 -0.2990
0.1635 410.0000 6.0162 -0.5940
0.0673 420.0000 6.0403 -0.9927

f=

-9.5305

g=

56.6413

sigzero =

381.1268

sigmax =

300.9700

Fin =

7.5512e-05

You might also like