plotting PDF & deterministic number

조회 수: 1 (최근 30일)
milad babaei
milad babaei 2011년 11월 4일
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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by