problem with Triangular distibution
2 views (last 30 days)
Show older comments
i want to do Triangular distibution i found this online it does not seem to be working
in addtion doesmy code follow the attached ![لقطة الشاشة (4).png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/264713/image.png)
![لقطة الشاشة (4).png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/264713/image.png)
clc
number_of_runs= 2;
x= 0.02;
syms n
syms k x
if d < 0.2
for j=(1:number_of_runs)
for k=(1:40)
for x = 0.02:.0018:0.2
pd1 = makedist('Triangular');
pdi = makedist('Triangular','a',0.05,'b',.10,'c',.15);
pdL = makedist('Triangular','a',19500,'b',20000,'c',20500);
pda = makedist('Triangular','a',5,'b',10,'c',15);
pdb = makedist('Triangular','a',1,'b',3,'c',5);
pdc = makedist('Triangular','a',1,'b',1.5,'c',2);
pdR = makedist('Triangular','a',1.69*10^-8,'b',1.7*10^-8,'c',1.7*10^-8);
pdD = makedist('Triangular','a',0.075,'b',0.08,'c',0.085);
pdP = makedist('Triangular','a',0.045,'b',0.05,'c',0.055);
pdDe = makedist('Triangular','a',8850,'b',8900,'c',8950);
pdV = makedist('Triangular','a',66000,'b',69000,'c',73000);
pdMC = makedist('Triangular','a',2.92,'b',3,'c',3.15);
pdFC = makedist('Triangular','a',500000,'b',1000000,'c',2000000);
pdT = makedist('Triangular','a',8550,'b',8600,'c',8750);
cdf1 = cdf(pd1,x);
cdfi = cdf(pdi,x);
cdfL = cdf(pdL,x);
cdfa = cdf(pda,x);
cdfb = cdf(pdb,x);
cdfc = cdf(pdc,x);
cdfR = cdf(pdR,x);
cdfD = cdf(pdD,x);
cdfP = cdf(pdP,x);
cdfDe = cdf(pdDe,x);
cdfV = cdf(pdV,x);
cdfMC = cdf(pdMC,x);
cdfFC = cdf(pdFC,x);
cdfT = cdf(pdT,x);
Io=36500*d - 160;
Rev= (3*1*Io*cdfV*cdfD*10^(-3)*(((1+cdfa)^2*(1+cdfb))^(k-1))*cdfT)/((1+cdfi)^k);
Fc=((1+cdfa)^2*(1+cdfc))^(k-1);
Fb=((1+cdfa)^2*(1+cdfb))^(k-1);
CL = (3*Io^2*cdfR*cdfL*((cdfT*cdfP*Fc)+(cdfD*Fb))/((1+cdfi)^k));
CI= cdfFC+ (cdfMC * cdfDe);
CT=CL + CI;
PV= (Rev -CT)/((1+cdfi)^k);
U= PV;
E = U*(1/number_of_runs);
end
disp (E)
disp (d)
d= d+0.0018;
end
end
0 Comments
Answers (0)
See Also
Categories
Find more on Polynomials in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!