plotting PDF & deterministic number

1 Ansicht (letzte 30 Tage)
milad babaei
milad babaei am 4 Nov. 2011
Hi all,
I have a script that i can get probability dist. for qult.now i would like to have the distribution of qult and a deterministic number( like: 6.28)showing like bar(verticle line) with different color in output when for example using this command hist(qult).would anyone please help me.
my code :
clear
clc;
B=300; L=600;Df=200; Sgama=0.8; dgama=1;
nsamples=800;
rmem = zeros(3,nsamples);
for K=1:nsamples
while true
C = normrnd(.683,.062);
if C<=.57 || C >= .8 || ismember(C,rmem(1,1:K-1)); continue; end
gama = normrnd(.00196,0.00002);
if gama <= .00192 || gama >= .00198 || ismember(gama,rmem(2,1:K-1)); continue; end
fi = normrnd(3.6,.4885);
if fi <= 2.7 || fi >= 4.8 || ismember(fi,rmem(3,1:K-1)); continue; end
rmem(:,K) = [C; gama; fi];
break
end
q=0.1073+(100*gama);
dq=1+(1.34*tan(fi*pi/180)*(1-sin(fi*pi/180)^2));
Sq=1+(0.5*sin(fi*pi/180));
Nq = tan((pi/4)+(pi*fi/360)) * tan((pi/4)+(pi*fi/360)) * exp(pi*tan(fi*pi/180));
Nc = (Nq-1)*cot(fi*pi/180);
Sc=1+(0.5* Nq / Nc);
Ngama = 1.5*(Nq-1)*tan(fi*pi/180);
qult(K)=(1.27*C*Nc*Sc)+(q*Nq*Sq*dq)+(0.13*Ngama);
end

Antworten (0)

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by