Documente Academic
Documente Profesional
Documente Cultură
c=1
for mu= [2,0]
for sigma= [0.2,0.5,1,5]
l=1
for x= [-5:0.1:5]
stock(l,c)=(1/sigma*sqrt(2*pi))*exp(-0.5*(x-mu/sigma)^2)
% stock(l,c)=(1/sigma*sqrt(2*pi))*exp(-0.5*((-5:0.1:5)-mu/sigma).^2)
l=l+1;
end
c=c+1;
end
end
% le maximum
maxi=max(stock)
% tri et moyen
tri=sort(maxi)
maxisupmoy=maxi(find(maxi>mean(maxi)))
%
couleur=['r','g','y','m','c','b','k','*m'];
for k=1:8
plot(-5:0.1:5,stock(:,k),couleur(k))
hold on
end
hold off
legend(' \mu=-2 \sigma=0.2',' \mu=-2 \sigma=0.5',' \mu=-2 \sigma=1',' \mu=-
2 \sigma=5',' \mu=0 \sigma=0.2',' \mu=0 \sigma=0.5',' \mu=0 \sigma=1','
\mu=0 \sigma=5',-1)
for x=0:0.2:dmax
trajet=-g/(2*(v0*cos(theta))^2)*x^2+tan(theta)*x;
plot(x,trajet,'*r')
hold on
end
hold off