%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% Illustration cours "Introduction aux Champs de Markov"%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Partie I : manipulation de champ binaire 
%----------------------------------------------
% creation d'une image aleatoire pour l'initialisation
np=128;
nl=128;
im = 2-ceil(2.*rand(np,nl));
imagesc(im);colormap(gray);

%definir la valeur de beta pour le champ que vous souhaitez simuler
beta=;
Srs=im;
imagesc(Srs); colormap(gray);

for n=1:100,
    Srs=echan(Srs,beta);
    imagesc(Srs); colormap(gray)
    title(sprintf('Echantillonnage, iter %d',n));
    drawnow;
end


