function [Ihat]=Exercice5(a,b,n,mc,exemple) switch exemple case 1 [Ihat]=Exemple1(a,b,n,mc); % Estimation du premier intégral case 2 [Ihat]=Exemple2(a,b,n,mc); % Estimation du deuxieme intégral case 3 [Ihat]=Exemple3(n,mc); % Estimation de la valeurs de pi. end end function [Ihat]=Exemple1(a,b,n,mc) S=(b-a)*1;% Surface du rectangle for j=1:mc Nbr=0; for i=1:n x=random('unif',a,b); y=random('unif',0,1); if (y