diff --git a/parmorceauxMax-git/HTN319.txt b/parmorceauxMax-git/HTN319.txt
new file mode 100644
index 0000000000000000000000000000000000000000..786e68a6ed4f9b903c503df89a9cd545a9525295
--- /dev/null
+++ b/parmorceauxMax-git/HTN319.txt
@@ -0,0 +1,25 @@
+1.926700000000000000e+04
+1.902000000000000000e+04
+1.874400000000000000e+04
+1.815700000000000000e+04
+1.702000000000000000e+04
+1.368000000000000000e+04
+1.148600000000000000e+04
+9.703000000000000000e+03
+8.250000000000000000e+03
+7.261000000000000000e+03
+6.785000000000000000e+03
+6.931000000000000000e+03
+7.017000000000000000e+03
+7.391000000000000000e+03
+8.095000000000000000e+03
+9.878000000000000000e+03
+1.243700000000000000e+04
+1.421700000000000000e+04
+1.539900000000000000e+04
+1.631200000000000000e+04
+1.698000000000000000e+04
+1.761900000000000000e+04
+1.825400000000000000e+04
+1.882700000000000000e+04
+1.920400000000000000e+04
diff --git a/parmorceauxMax-git/HTN320.txt b/parmorceauxMax-git/HTN320.txt
new file mode 100644
index 0000000000000000000000000000000000000000..dbaf22844fb82d2112a66d6ef61e2986c77bd8d7
--- /dev/null
+++ b/parmorceauxMax-git/HTN320.txt
@@ -0,0 +1,25 @@
+2.163700000000000000e+04
+1.804500000000000000e+04
+1.839600000000000000e+04
+1.878900000000000000e+04
+1.517800000000000000e+04
+1.375100000000000000e+04
+1.200000000000000000e+04
+1.040900000000000000e+04
+9.332000000000000000e+03
+9.682000000000000000e+03
+9.296000000000000000e+03
+9.940000000000000000e+03
+1.015600000000000000e+04
+1.024000000000000000e+04
+1.074500000000000000e+04
+1.157100000000000000e+04
+1.227300000000000000e+04
+1.375700000000000000e+04
+1.443800000000000000e+04
+1.507700000000000000e+04
+1.559700000000000000e+04
+1.641400000000000000e+04
+1.733300000000000000e+04
+1.793800000000000000e+04
+1.841100000000000000e+04
diff --git a/parmorceauxMax-git/HTN321.txt b/parmorceauxMax-git/HTN321.txt
new file mode 100644
index 0000000000000000000000000000000000000000..3c4d3f1add965dd05c2d71219693a9f233f81c48
--- /dev/null
+++ b/parmorceauxMax-git/HTN321.txt
@@ -0,0 +1,25 @@
+1.954400000000000000e+04
+1.934700000000000000e+04
+1.794400000000000000e+04
+1.577000000000000000e+04
+1.431800000000000000e+04
+1.279900000000000000e+04
+1.091300000000000000e+04
+9.179000000000000000e+03
+7.974000000000000000e+03
+7.012000000000000000e+03
+6.230000000000000000e+03
+5.746000000000000000e+03
+5.827000000000000000e+03
+6.672000000000000000e+03
+7.861000000000000000e+03
+1.021100000000000000e+04
+1.172300000000000000e+04
+1.356200000000000000e+04
+1.471400000000000000e+04
+1.574300000000000000e+04
+1.641500000000000000e+04
+1.699600000000000000e+04
+1.748800000000000000e+04
+1.842300000000000000e+04
+1.881800000000000000e+04
diff --git a/parmorceauxMax-git/HTN322.txt b/parmorceauxMax-git/HTN322.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b0380c53fb117c6d61f985db719fe32305bb9ed0
--- /dev/null
+++ b/parmorceauxMax-git/HTN322.txt
@@ -0,0 +1,25 @@
+2.706000000000000000e+04
+2.273200000000000000e+04
+2.073500000000000000e+04
+1.713100000000000000e+04
+1.408500000000000000e+04
+1.138800000000000000e+04
+9.589000000000000000e+03
+8.362000000000000000e+03
+7.824000000000000000e+03
+8.599000000000000000e+03
+7.907000000000000000e+03
+8.832000000000000000e+03
+9.581000000000000000e+03
+1.205800000000000000e+04
+1.363100000000000000e+04
+1.511600000000000000e+04
+1.646000000000000000e+04
+1.784500000000000000e+04
+1.958700000000000000e+04
+2.142300000000000000e+04
+2.266700000000000000e+04
+2.374000000000000000e+04
+2.445000000000000000e+04
+2.505300000000000000e+04
+2.541000000000000000e+04
diff --git a/parmorceauxMax-git/Interface.asv b/parmorceauxMax-git/Interface.asv
new file mode 100644
index 0000000000000000000000000000000000000000..5ea2b494ecd802460b69d680da51325c1f0d3a42
--- /dev/null
+++ b/parmorceauxMax-git/Interface.asv
@@ -0,0 +1,377 @@
+classdef Interface < handle
+    properties
+        %% données d'entrée
+        T %temps (ou numéro de frame)
+        Y %observation : volume du ventricule gauche. Une observation (frame) par ligne de Y
+        N
+        
+        %% résultats en sortie
+        meilleure_sequence
+        meilleure_sequence_models
+        loglikelihood
+        
+        %% modèle statistique
+        interpolant_filenames
+        
+        %% morceaux courants (cad non finis) A, B1, B2 et C
+        dynamics_models
+        first_frame_of_models
+        
+        %% paramètres de la méthode
+        initial_alphas
+        
+        sigma_estimation
+        sigma_test
+        
+        threshold_dynamics
+        
+        display_screen
+        
+        %% Viterbi
+        transition
+        
+        proba_morceaux          % probabilité courante pour chaque morceau, avec son meilleur path Viterbi
+        morceaux_finis          % pour chaque morceau courant : liste des morceaux finis du path. Cette liste contient une copie du morceau dans l'état où il était quand il a été terminé
+        proba_morceaux_finis    % pour chaque morceau courant : liste des probabilités associées aux morceaux finis. Elle combine la proba de chaque observation du morceau et la proba de transition du morceau au suivant
+        
+        model_indexes           % pour chaque morceau courant : liste des indices des morceaux du path Viterbi pour chaque frame
+        scores_finis            % pour chaque morceau courant : liste des proba d'observation pour chaque frame (uniquement les frames des morceaux finis, car le morceau courant n'est pas encore stable et les x peuvent encore changer)
+        
+    end
+    methods
+        function obj = Interface(interpolant_filenames, display_screen)
+            
+            obj.interpolant_filenames = interpolant_filenames;
+            
+%             obj.transition = [  0.5 0.5 0 0;   % départ de A
+%                                 0 1/3 1/3 1/3; % départ de B1
+%                                 0 0 0.5 0.5;   % départ de B2
+%                                 0 0 0 1        % départ de C
+%                              ];
+
+            tr = load("trans.mat");
+            obj.transition = tr.trans;
+            obj.display_screen = display_screen;
+        end
+        function process_new_sequence(obj, filename, initial_alphas, sigma_estimation, sigma_test, threshold_dynamics)
+            obj.threshold_dynamics = threshold_dynamics;
+            
+            obj.dynamics_models = {NaN, NaN, NaN, NaN}; % modèles courants A B1 B2 et C
+            obj.first_frame_of_models = [1 NaN NaN NaN]; % frame où chaque modèle commence
+            
+            if obj.display_screen == -1
+                obj.dynamics_models{1} = Dynamics_Model(obj.interpolant_filenames{1}, obj.display_screen);
+            else
+                obj.dynamics_models{1} = Dynamics_Model(obj.interpolant_filenames{1}, obj.display_screen+1);
+            end
+            
+            obj.proba_morceaux = [1 0 0 0]; % proba des modèles A, B1, B2, et C
+            
+            obj.T = [];
+            obj.Y = [];
+            obj.N = [];
+            
+            obj.scores_finis = {[], [], [], []};
+            obj.model_indexes = {[], [], [], []};
+            
+            obj.initial_alphas = initial_alphas;
+            obj.sigma_estimation = sigma_estimation;
+            obj.sigma_test = sigma_test;
+            
+            obj.morceaux_finis = {[], [], [], []};
+            obj.proba_morceaux_finis = {[], [], [], []};
+            
+            obj.read_data(filename);
+            obj.N = size(obj.T,1);
+            
+            obj.dynamics_models{1}.initialise(0, initial_alphas(1), sigma_estimation, sigma_test,1);
+            %ligne 14
+            for frame=1:obj.N
+                obj.process_frame(frame);
+                
+                if obj.display_screen ~= -1
+                    for model=1:4
+                        if obj.proba_morceaux(model) == 0 || isnan(obj.proba_morceaux(model))
+                            continue
+                        end
+                        obj.dynamics_models{model}.plot_estimated_X();
+                    end
+                end
+            end
+            
+            
+            %% choix de la meilleure sequence (peut être pour plus tard: toujours choisir la séquence qui se termine sur le modèle C ?)
+            [max_proba, indice] = max(obj.proba_morceaux);
+            obj.meilleure_sequence = obj.model_indexes{indice};
+            obj.meilleure_sequence_models = [obj.morceaux_finis{indice} obj.dynamics_models{indice}];
+            
+            %% calcul les scores pour les frames du dernier morceau
+            % mise à jour des x pour bien les étaler
+            obj.meilleure_sequence_models(end).spread_X();
+            new_scores = obj.meilleure_sequence_models(end).compute_loglikelihood_dynamics([1:obj.N-obj.first_frame_of_models(indice)+1]);
+            obj.loglikelihood = [obj.scores_finis{indice} new_scores];
+            
+            %% à faire : afficher la séquence des modèles et la séquence de scores comme dans plot
+            close all
+            for i=1:length(obj.meilleure_sequence_models)
+                obj.meilleure_sequence_models(i).plot_estimated_X();
+            end
+%%%         save plot
+     
+        end
+        function read_data(obj, filename)
+            obj.Y =load(filename);
+            %obj.T = [1:75]';
+            %obj.Y = obj.Y / max(obj.Y);
+            %obj.Y = repmat(obj.Y, 3, 1);
+            obj.T = [1:25]';
+            obj.Y = obj.Y / max(obj.Y);
+        end
+        function process_frame(obj, frame_number)
+            
+            frame_number
+            
+            Yt = obj.Y(frame_number,:);
+            Tt = obj.T(frame_number);
+            
+            %% tableaux temporaires dans lesquels on prépare la prochaine version des tableaux de la classe sans les modifier avant d'avoir terminé de traiter la frame pour tous les morceaux
+            new_proba_morceaux = [NaN NaN NaN NaN];
+            new_morceaux_finis = {[], [], [], []};
+            new_proba_morceaux_finis = {[], [], [], []};
+            
+            new_models = {NaN, NaN, NaN, NaN};
+            new_first_frame_of_models = [NaN NaN NaN NaN];
+            
+            new_scores_finis = {[], [], [], []};
+            new_model_indexes = {[], [], [], []};
+            
+            
+            %% boucle sur les 4 modèles possibles
+            for morceau = 1:4
+                
+                % on va regarder toutes les branches qui arrivent sur le modèle
+                
+                %% tableaux temporaires pour le morceau courant et toutes les branches possibles
+                modele_branche = {NaN, NaN, NaN, NaN};               % copie des modèles pour leur montrer la nouvelle frame, sans modifier ceux de obj.dynamics_models
+                first_frame_of_model_branche = [NaN NaN NaN NaN];    % pour les copies des modèles
+                proba_obs_branche = [NaN NaN NaN NaN];               % proba d'observation donnée par les copies des modèles ayant vu la frame courante
+                nouveau_morceau_fini_branche = {NaN, NaN, NaN, NaN}; % si une branche implique un nouveau morceau fini, on le sauvegarde ici en attendant Viterbi et le choix de la branche (cad si on le garde ou pas)
+                proba_branche = [NaN NaN NaN NaN];                   % proba totale de chaque branche
+                proba_morceau_prec = [NaN NaN NaN NaN];              % proba totale des frames vues par le morceau qui était courant à la frame précédente (donc d'indice=branche). Ces proba sont combinées avec les probas de transition au sein du morceau
+                new_scores_branche = {[] [] [] []};                  % score des frames vues par le morceau qui était courant à la frame précédente
+                
+                if frame_number == 1
+                    if obj.proba_morceaux(morceau) == 0
+                        continue
+                    end
+                    
+                    new_models{morceau} = copy(obj.dynamics_models{morceau});
+                    new_first_frame_of_models(morceau) = obj.first_frame_of_models(morceau);
+                    
+                    new_models{morceau}.process_new_frame(Yt, Tt);
+                    proba_obs = new_models{morceau}.compute_loglikelihood_dynamics(1);
+                    
+                    new_proba_morceaux(morceau) = log(obj.proba_morceaux(morceau)) + proba_obs;
+                    new_morceaux_finis{morceau} = [];
+                    
+                    new_model_indexes{morceau} = [morceau];
+                else
+                    %% on calcule les probas de toutes les branches qui arrivent sur le morceau courant
+                    for branche = 1:4
+                        duree=1; 
+                       %trans = obj.transition{frame_number}(branche, morceau);
+                       trans = obj.transition{branche, morceau}(frame_number);
+                       if frame_number>2
+                            duree=sum(obj.model_indexes{branche}==branche);
+                            if (duree>0)
+                                %trans = obj.transition{duree}(branche, morceau);
+                                trans = obj.transition{branche, morceau}(duree);
+                            end
+                       end
+          
+
+                        % on commence par ignorer les branches impossibles
+                        if trans == 0
+                            continue
+                        end
+                        if obj.proba_morceaux(branche) == 0 || isnan(obj.proba_morceaux(branche))
+                            continue
+                        end
+                        
+                        if branche == morceau   % cas sans changement de modèle, donc le modèle est déjà initialisé
+                            modele_branche{branche} = copy(obj.dynamics_models{branche});
+                            first_frame_of_model_branche(branche) = obj.first_frame_of_models(morceau);
+                        else            % cas avec changement de modèle, donc il faut créer et initialiser le modèle
+                            %% on crée le modèle et on l'initialise
+                            if obj.display_screen == -1
+                                modele_branche{branche} = Dynamics_Model(obj.interpolant_filenames{morceau}, obj.display_screen);
+                            else
+                                modele_branche{branche} = Dynamics_Model(obj.interpolant_filenames{morceau}, obj.display_screen+morceau);
+                            end
+                            modele_branche{branche}.initialise(0, obj.initial_alphas(morceau), obj.sigma_estimation, obj.sigma_test,morceau);
+                            %modele_branche{branche}.initialise(0, obj.dynamics_models{branche}.current_alpha, obj.sigma_estimation, obj.sigma_test);
+                            first_frame_of_model_branche(branche) = frame_number;
+                        end
+                            
+                        %% on donne la frame au modèle, et on récupère la proba d'observation (dans la fenêtre)
+                        modele_branche{branche}.process_new_frame(Yt, Tt);
+                        %print branche et morceau
+                        BRANCHE=branche
+                        MORCEAU=morceau
+                        proba_obs_branche(branche) = modele_branche{branche}.compute_loglikelihood_dynamics(frame_number-first_frame_of_model_branche(branche)+1);
+                        
+                        %% on garde en mémoire les morceaux qui sont finis, pour l'affichage final des X
+%%%%                    %%%%%%%%%%%%%%%% a faire : mettre à jour les x pour bien les étaler
+                        if branche == morceau
+                            nouveau_morceau_fini_branche{branche} = 0;
+                        else
+                            nouveau_morceau_fini_branche{branche} = copy(obj.dynamics_models{branche}); % ce modèle n'a pas encore vu la frame courante, on peut donc le sauvegader dans son état à la frame précédente
+%%%%                        %%%%%% mettre à jour la copie ici
+                            nouveau_morceau_fini_branche{branche}.spread_X();
+                        end
+                        
+                        %% on récupère les scores des frames vues par le modèle
+                        if branche == morceau
+                            %% on récupère les scores pour les frames précédentes, qui ont pu bouger avec le argmax
+                            proba_morceau_prec(branche) = sum(modele_branche{branche}.compute_loglikelihood_dynamics([1:frame_number-first_frame_of_model_branche(branche)]));
+                           % proba_morceau_prec(branche) = proba_morceau_prec(branche) + log(trans) * (frame_number-first_frame_of_model_branche(branche)-1);
+                           %test sum(obj.transition{1,2}(9:10))
+                           
+                           transi=sum(obj.transition{branche,branche}(1:frame_number-first_frame_of_model_branche(branche)-1));
+                           proba_morceau_prec(branche) = proba_morceau_prec(branche) + log(transi);
+                        else
+                            %% on récupère les scores pour les frames précédentes, qui ont pu bouger avec le argmax
+                            new_scores_branche{branche} = nouveau_morceau_fini_branche{branche}.compute_loglikelihood_dynamics([1:frame_number-obj.first_frame_of_models(branche)]);
+                            proba_morceau_prec(branche) = sum(new_scores_branche{branche});
+                            %trans_morceau_prec = obj.transition{duree}(branche, branche);
+                            %proba_morceau_prec(branche) = proba_morceau_prec(branche) + log(trans_morceau_prec) * (frame_number-obj.first_frame_of_models(branche)-1);
+                            trans_morceau_prec = sum(obj.transition{branche,morceau}(1:frame_number-obj.first_frame_of_models(branche)))
+                            proba_morceau_prec(branche) = proba_morceau_prec(branche) + log(trans_morceau_prec);
+                        end
+          
+                        proba_branche(branche) = sum(obj.proba_morceaux_finis{branche}) + proba_morceau_prec(branche) + log(trans) + proba_obs_branche(branche);
+                    %duree
+                    end
+                    
+                    %% on choisi la meilleure branche
+                    [max_val, indice] = max(proba_branche);
+                    
+                    if isnan(max_val)
+                        continue
+                    end
+                    
+                    new_proba_morceaux(morceau) = max_val;
+                    
+                    new_models{morceau} = modele_branche{indice};
+                    new_first_frame_of_models(morceau) = first_frame_of_model_branche(indice);
+                    
+                    if nouveau_morceau_fini_branche{indice} ~= 0
+                        new_morceaux_finis{morceau} = [obj.morceaux_finis{indice} nouveau_morceau_fini_branche{indice}];
+                        %trans=obj.transition{frame_number}(indice,morceau);
+                        trans=obj.transition{indice,morceau}(frame_number);
+                        if duree>0
+                            %trans = obj.transition{duree}(indice, morceau);
+                            trans = obj.transition{indice, morceau}(duree);
+                        end
+                        new_proba_morceaux_finis{morceau} = [obj.proba_morceaux_finis{indice} proba_morceau_prec(indice) + log(trans)];
+                        new_scores_finis{morceau} = [obj.scores_finis{indice} new_scores_branche{indice}];
+                    else
+                        new_morceaux_finis{morceau} = obj.morceaux_finis{indice};
+                        new_proba_morceaux_finis{morceau} = obj.proba_morceaux_finis{indice};
+                        new_scores_finis{morceau} = obj.scores_finis{indice};
+                    end
+                    
+                    new_model_indexes{morceau} = [obj.model_indexes{indice} morceau];
+                end
+            end
+            
+            obj.proba_morceaux = new_proba_morceaux;
+            obj.dynamics_models = new_models;
+            obj.first_frame_of_models = new_first_frame_of_models;
+            
+            obj.scores_finis = new_scores_finis;
+            
+            obj.morceaux_finis = new_morceaux_finis;
+            obj.proba_morceaux_finis = new_proba_morceaux_finis;
+            
+            obj.model_indexes = new_model_indexes;
+         
+            
+            %% réflexions pour plus tard
+            %% gérer : alpha différents pour les différents modèles (alpha_ini + marges)
+            %%         fin des modèles : duppliquer les dernières colonnes pour que x ait le temps de se fixer ? (avec pénalité lors de la comparaison des modèles)
+            %%         ou alors : on n'attend pas que les x soient stables
+            %%         initialiser le modèle concurrent à chaque fois (tant qu'on n'a pas basculé dessus)    
+        end
+        function plot(obj) %% cette fonction est à modifier car maintenant nous avons plusieurs modèles / morceaux
+            obj.dynamics_model.plot_estimated_X();
+            
+            figure(obj.display_screen);
+            n = length(obj.loglikelihood_dynamics_window);
+            subplot(4,1,1)
+            hold off
+            plot(obj.T(1:n),obj.Y(1:n,1))
+            title('Pose representation')
+            xlabel('frame number')
+            ylabel('1st dimension')
+            XL = xlim;
+            
+            subplot(4,1,2)
+            hold off
+            plot(obj.T(1:n),obj.loglikelihood_pose)
+            hold on
+            indexes_p = (obj.loglikelihood_pose < obj.threshold_pose);
+            plot(obj.T(indexes_p),obj.loglikelihood_pose(indexes_p),'.r')
+            title('Likelihood of the pose to be normal')
+            xlabel('Frame number')
+            ylabel('Log likelihood')
+            xlim(XL)
+            YL = ylim;
+            YL1 = max(YL(1),-5);
+            ylim([YL1 YL(2)])
+            hold on
+            
+            subplot(4,1,3)
+            hold off
+            plot(obj.T(1:n),obj.loglikelihood_dynamics_window)
+            hold on
+            indexes_w = (obj.loglikelihood_dynamics_window < obj.threshold_dynamics);
+            plot(obj.T(indexes_w),obj.loglikelihood_dynamics_window(indexes_w),'.r')
+            title('Likelihood of the dynamics to be normal, computed in the dynamic window')
+            xlabel('Frame number')
+            ylabel('Log likelihood')
+            xlim(XL)
+            YL = ylim;
+            YL1 = max(YL(1),-20);
+            ylim([YL1 YL(2)])
+            hold on
+            
+            subplot(4,1,4)
+            hold off
+            n2 = length(obj.loglikelihood_dynamics);
+            plot(obj.T(1:n2),obj.loglikelihood_dynamics)
+            hold on
+            indexes_d = (obj.loglikelihood_dynamics < obj.threshold_dynamics);
+            plot(obj.T(indexes_d),obj.loglikelihood_dynamics(indexes_d),'.r')
+            title('Likelihood of the dynamics to be normal, computed for each converged frame')
+            xlabel('Frame number')
+            ylabel('Log likelihood')
+            xlim(XL)
+            YL = ylim;
+            YL1 = max(YL(1),-20);
+            YL2 = min(YL(2),10);
+            ylim([YL1 YL2])
+            hold on
+            
+            subplot(4,1,1)
+            hold on
+            plot(obj.T(indexes_p),obj.Y(indexes_p,1),'.r')
+            %plot(obj.T(indexes_w),obj.Y(indexes_w,1),'.r')
+            plot(obj.T(indexes_d),obj.Y(indexes_d,1),'.r')
+            %indexes = indexes_p == 0 & indexes_w == 0 & [indexes_d ones(1,n-n2)] == 0;
+            indexes = indexes_p == 0 & [indexes_d ones(1,n-n2)] == 0;
+            plot(obj.T(indexes),obj.Y(indexes,1),'.g')
+        end
+
+    end
+end
diff --git a/parmorceauxMax-git/ROC.m b/parmorceauxMax-git/ROC.m
index c2391a4d2488cb2d9126a95591d2e463a9a04209..0bf1c824754a7646056511d64d98f1f67acc5afc 100644
--- a/parmorceauxMax-git/ROC.m
+++ b/parmorceauxMax-git/ROC.m
@@ -1,6 +1,9 @@
 function [F_mesure,M_seuil]=ROC()
-    Seuil=[-9:0.1:1];
-    diagn=[true,false,true,false,false,true,false,false,false,false,true,false,true,false,false,true,false,false,false,false,true,false,false,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true];
+    %Seuil=[-9:0.1:1];
+    %Seuil=[0:0.001:5];%[-6:0.01:5];%[-6:0.001:5];%[-3:0.001:7]
+    Seuil=[-5:0.01:6];
+    diagn=[true,false,false,false,true,false,false,false,false,true,false,true,false,false,false,false,false,false,false,false,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true];
+    %[true,false,true,false,false,true,false,false,false,false,true,false,true,false,false,true,false,false,false,false,true,false,false,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true]
     a=1;
     listept=dir(['LLLDyn*.txt']);
     X=zeros(1,47);
@@ -9,7 +12,7 @@ function [F_mesure,M_seuil]=ROC()
     R=zeros(1,47);
     dist1=2^(1/2);
     F_mesure1=0;
-    while Seuil(a)~=1
+    while Seuil(a)~=Seuil(end)
         seuil=Seuil(a);
         [TN,TP,FN,FP]=TN_TP_FN_FP(listept,seuil,diagn);
         TPR=TP/(TP+FN);
@@ -39,10 +42,11 @@ function [F_mesure,M_seuil]=ROC()
     dist2=(FPR^2+(TPR-1)^2)^(1/2)
     M_seuil
     %Seuil(81);
-    plot(X,Y);
+    plot(X,Y)
+    %hold on
+    %plot([0 1],[0 1])
     %(1,82);
     %X(1,82);
-    
     [X2,I]=sort(X);
     Y2=Y(I);
     len=length(X2);
diff --git a/parmorceauxMax-git/example_test_models.asv b/parmorceauxMax-git/example_test_models.asv
new file mode 100644
index 0000000000000000000000000000000000000000..e16010f4d8cac7c4e79e15132ef08bc4cdb021b7
--- /dev/null
+++ b/parmorceauxMax-git/example_test_models.asv
@@ -0,0 +1,195 @@
+%F_Mesure=0;
+%M_Seuil=0;
+%for initial_alpha=0.035:0.001:0.043%0.035:0.001:0.045%0.01:0.01:0.1%0.05:0.05
+    %% liste of testing data
+    liste = dir(['HTN*.txt']);
+    save testtest1.mat
+    save testtest2.mat
+    save LLLDynWin.mat
+    save LLLDyn.mat
+    %% initialisation
+    % set display to -1 to disable
+    display = -1;%1(ancienne version)%7;%-1
+    interface = Interface({'interpolants_A', 'interpolants_B1', 'interpolants_B2', 'interpolants_C'}, display);
+    % set initial_alpha = -1 to have it estimated automatically
+    initial_alpha =0.037% 0.038 %0.04;%0.05 %0.025;(0.039)
+    sigma_estimation = 7e-3;
+    sigma_test = 1e-3;
+    threshold_dynamics = -0.7;
+    %% testing
+    J=[9];%[2,3,4,7,8,9,11,13,14,16,17,18,19,20,24,25,33,39,43,45,47];%J= [8,9,10,14,15,16,20,22,23,27,28,29,33,37,38,42,43]%2,4,5,%J=[2,4,5,8,9,10,11,14,15,20,22,27,28,29,43,46,47]%[8,29,42,45,46]%J=[1,3,6,11,13,16,21,24,25,26,27,29];
+%     patient_prbl_1=[]; 
+%     for i=1:47
+%        for j=1:25
+%            if (LLLDyn(i,j)<=3.7910)
+%               patient_prbl_1(end+1)=i;
+%               break 
+%            end
+%        end
+%    end
+%    patient_prbl_1
+%    listept=dir(['LLLDynpt*.txt']);
+%    diagn=[true,false,false,false,true,false,false,false,false,true,false,true,false,false,false,false,false,false,false,false,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true];
+%    X=[0:1/24:1];
+%    Y=zeros(1,25);
+%    cpt=0
+%    patientundred=[]
+%    for i=1:length(listept)
+%        suppr=false;
+%        x=load(listept(i).name)
+% %        for j=1:25
+% %            j
+% %             if x(j)<=3.5750;
+% %                 suppr=true;
+% %                 patientundred(end+1)=i;
+% %                 break
+% %             end
+% %        end
+%        if (suppr==false)
+%            i
+%              if (diagn(i)==true)
+%                    hold on
+%                    plot(x,'Color','#ffaa45')
+%              else
+%                    hold on
+%                    plot(x,'Color','#6da0d6','tag',listept(i).name)
+%                    
+%              end
+%              
+%        else
+%            continue
+%        end
+%    end
+%    hold on 
+%    yline(0.5510)
+%    patientundred
+% datacursormode on
+% dcm = datacursormode(gcf);
+% set(dcm,'UpdateFcn',@myupdatefcn)
+% function txt = myupdatefcn(trash,event)
+% pos = get(event,'Position');
+% dts = get(event.Target,'Tag');
+% txt = {dts,...
+%        ['X: ',num2str(pos(1))],...
+%      ['Y: ',num2str(pos(2))]};
+    for i=1:length(J)%length(J)%length(liste)
+        filename=strcat(liste(J(i)).name)%liste(i).name%liste(J(i)).name
+        interface.process_new_sequence(filename,[0.1059 0.1622 0.2712 0.45] , sigma_estimation, sigma_test, threshold_dynamics);%[1/(11.6-1) 1/(7.1-1) 1/(4.9-1) 1/(3.2-1)] [1/(10.667-1) 1/(7.278-1) 1/(4.929-1) 1/(3.222-1)][0.1034 0.1651 0.2586 0.45]
+        %j'essaie de "save" les meilleurs sequences
+        testtest1=interface.meilleure_sequence
+        testtest2=interface.loglikelihood
+        if (i==1)
+            bestSequence=testtest1;
+            LLLDyn=testtest2;
+        end
+        if (i>1)
+            bestSequence=[bestSequence;testtest1];
+            LLLDyn=[LLLDyn;testtest2];
+        end
+
+        %LLLDyn=interface.loglikelihood
+
+%% détection de patient avec problème
+% 
+%         for j=LLLDyn
+%             if (j<4.5530)
+%                 patient_prbl_1(end+1)=i;
+%                 break
+%             end
+%         end
+ 
+%% détection patient avec plateau
+% cpt=0;
+%         for j=testtest1
+%             if (j==3)
+%                 cpt=cpt+1;
+%                 if (cpt==3)
+%                     patient_plateau(end+1)=i;
+%                     break
+%                 end
+%             end
+%         end
+
+%% save des scores
+
+%         testtest1=interface.loglikelihood_dynamics_window(26:50);
+%         testtest2=interface.loglikelihood_dynamics(26:50);
+%         if (i==1)
+%             LLLDynWin=testtest1;
+%             LLLDyn=testtest2;
+%         end
+%         if (i>1)
+%             LLLDynWin=[LLLDynWin;testtest1];
+%             LLLDyn=[LLLDyn;testtest2];
+%         end
+
+%% on regroupe les 4 images en une seule figure
+
+%             onion = imread('ModèleA.png');
+%             onionArray = repmat(onion, [ 1 1 1 4 ]);
+%             im=montage(onionArray,'size',[1 NaN])
+%             saveas(im, 'final_model.png')
+% 
+%     model=["ModèleA.png" "ModèleB1.png" "ModèleB2.png" "ModèleC.png"]; 
+%     for w=1:3
+%          img=imread(model(w));
+%          subplot(1,3,w)
+%          imshow(img);
+%      end
+%        J(i)
+       % liste(J(i)).name
+       %i
+    end
+
+   %% affichage
+
+%    patient_prbl_1
+%   patient_plateau
+    %figure()
+    %plot([1:25],LLLDynWin)
+    %figure()
+    %plot([1:25],LLLDyn)
+    %
+    
+    for i=1:length(liste)%length(J)%length(liste)
+        if (i < 10)
+            name = strcat('0',int2str(i));
+        else
+            name = int2str(i);
+        end
+        
+        dlmwrite(strcat('LLLDynpt',name,'.txt'),LLLDyn(i,:));
+    end   
+% %% plot score avec couleurs pour distinguer patients sains
+%    listept=dir(['LLLDyn*.txt']);
+%    diagn=[true,false,false,false,true,false,false,false,false,true,false,true,false,false,false,false,false,false,false,false,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true];
+%    for i=1:length(diagn)
+%        hold on
+%        if (diagn==true)
+%            plot(LLLDyn(i),'Color','#ffaa45')
+%        else
+%            plot(LLLDyn(i))
+%        end
+%    end
+% plot(LLLDyn)
+    %[f_mesure,m_seuil]=find_seuil_score()
+    %if f_mesure>F_Mesure
+        %F_Mesure=f_mesure
+        %optinitial_alpha=initial_alpha
+        %M_Seuil=m_seuil
+    %end
+%end
+%F_Mesure
+%M_Seuil
+%optinitial_alpha
+
+%% code pour extraire les patients détectés malade
+%    for i=1:47
+%        for j=1:25
+%            if (LLLDyn(i,j)<3.9410)
+%               patient_prbl_1(end+1)=i;
+%               break 
+%            end
+%        end
+%    end
+%    patient_prbl_1
diff --git a/parmorceauxMax-git/interpolants_A.mat b/parmorceauxMax-git/interpolants_A.mat
index ba6c4024b3794859db242eeaa5b466c0cb3e3f35..f2b9174e951683e3daa0a560b31a7f63d07ec3fa 100644
Binary files a/parmorceauxMax-git/interpolants_A.mat and b/parmorceauxMax-git/interpolants_A.mat differ
diff --git a/parmorceauxMax-git/interpolants_B1.mat b/parmorceauxMax-git/interpolants_B1.mat
index e6b579fc69c10bd0535ec2ac3899294557ba2e26..598a280a3a434ebff8b31f257cdec16e4fae40f3 100644
Binary files a/parmorceauxMax-git/interpolants_B1.mat and b/parmorceauxMax-git/interpolants_B1.mat differ
diff --git a/parmorceauxMax-git/interpolants_B2.mat b/parmorceauxMax-git/interpolants_B2.mat
index 3cd68f84be0f38631c3ab5d8f3365a4679e92591..f797fb1a8c054ad7aaaca388f7a022e5590107d8 100644
Binary files a/parmorceauxMax-git/interpolants_B2.mat and b/parmorceauxMax-git/interpolants_B2.mat differ
diff --git a/parmorceauxMax-git/interpolants_C.mat b/parmorceauxMax-git/interpolants_C.mat
index d8aa33fb9da793cd1b8918dbe550d6b44586d8f1..cc5b524f9ce1de4e071ecac59eaef729148c0ec8 100644
Binary files a/parmorceauxMax-git/interpolants_C.mat and b/parmorceauxMax-git/interpolants_C.mat differ
diff --git a/parmorceauxMax-git/matrice_transition.asv b/parmorceauxMax-git/matrice_transition.asv
new file mode 100644
index 0000000000000000000000000000000000000000..aacbb0d07e65225523dcac51e55d869ae8f9757a
--- /dev/null
+++ b/parmorceauxMax-git/matrice_transition.asv
@@ -0,0 +1,192 @@
+function transition=matrice_transition(eps)
+%C=xlsread('p_t_test.xls');
+C=xlsread('proba_transition.xls');
+%transition=repmat({[zeros(3,4);[0 0 0 1]]},1,sum(C(1,:)));
+N=sum(C(1,:));
+A=repmat({zeros(1,N)}, 3, 4);
+B=repmat({zeros(1,N)}, 1, 3);
+transition=[A; [B, {ones(1,N)}]];
+for i=[1,3]
+    M=max(C(:,i));
+    for j=1:M
+        ind_col=C(:,i)>j
+        ind_col_prec=C(:,i)>=j
+        num1=sum(ind_col)
+        num2=(sum(ind_col_prec)-sum(ind_col))
+        if sum(ind_col)==0
+            transition{i,i}(j)=eps;
+            transition{i,i+1}(j)=num2/sum(ind_col_prec)-eps
+        elseif (sum(ind_col_prec)-sum(ind_col))==0
+            transition{i,i}(j)=num1/sum(ind_col_prec)-eps
+            transition{i,i+1}(j)=eps;
+        else
+            transition{i,i}(j)=num1/sum(ind_col_prec);
+            transition{i,i+1}(j)=num2/sum(ind_col_prec);
+        end
+    end
+    for k=M:sum(C(1,:))
+        transition{i,:}(k)=transition{}(M);
+    end
+end
+for i=2
+    M=max(C(:,i));
+    for j=1:M
+        ind_col=C(:,i)>j;
+        ind_col_prec=C(:,i)>=j;
+        ind_colb1=C(:,2)>j;
+        ind_colc=C(:,i)==j;
+        if sum(ind_colb1)==0
+            if (sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))==0
+                transition{j}(i,i)=eps;
+                transition{j}(i,i+1)=eps;
+                transition{j}(i,i+2)=sum(C(ind_colc,3)==0)/sum(ind_col_prec)-2*eps;
+            else
+                if sum(ind_colc)==0
+                    transition{j}(i,i)=eps;
+                    transition{j}(i,i+1)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec)-2*eps;
+                    transition{j}(i,i+2)=eps;
+                else
+                    transition{j}(i,i)=eps;
+                    transition{j}(i,i+1)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec)-1/2*eps;
+                    transition{j}(i,i+2)=sum(C(ind_colc,3)==0)/sum(ind_col_prec)-1/2*eps;
+                end
+            end
+        else
+            if (sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))==0
+                if sum(ind_colc)==0
+                    transition{j}(i,i)=sum(ind_colb1)/sum(ind_col_prec)-2*eps;
+                    transition{j}(i,i+1)=eps;
+                    transition{j}(i,i+2)=eps;
+                else
+                    transition{j}(i,i)=sum(ind_colb1)/sum(ind_col_prec)-1/2*eps;
+                    transition{j}(i,i+1)=eps;
+                    transition{j}(i,i+2)=sum(C(ind_colc,3)==0)/sum(ind_col_prec)-1/2*eps;
+                end
+            else
+                if sum(ind_colc)==0
+                    transition{j}(i,i)=sum(ind_colb1)/sum(ind_col_prec)-1/2*eps;
+                    transition{j}(i,i+1)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec)-1/2*eps;
+                    transition{j}(i,i+2)=eps;
+                else
+                    transition{j}(i,i)=sum(ind_colb1)/sum(ind_col_prec);
+                    transition{j}(i,i+2)=sum(C(ind_colc,3)==0)/sum(ind_col_prec);
+                    transition{j}(i,i+1)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec);
+                end
+            end
+        end
+
+    end
+    for k=M:sum(C(1,:))
+        transition{k}(i,:)=transition{M}(i,:);
+    end
+end
+end
+
+
+
+
+% for i=[1,3]
+%     M=max(C(:,i));
+%     for j=1:M
+%         ind_col=C(:,i)>j
+%         ind_col_prec=C(:,i)>=j
+%         num1=sum(ind_col)
+%         num2=(sum(ind_col_prec)-sum(ind_col))
+%         if sum(ind_col)==0
+%             transition{j}(i,i)=eps;
+%             transition{j}(i,i+1)=num2/sum(ind_col_prec)-eps
+%         elseif (sum(ind_col_prec)-sum(ind_col))==0
+%             transition{j}(i,i)=num1/sum(ind_col_prec)-eps
+%             transition{j}(i,i+1)=eps;
+%         else
+%             transition{j}(i,i)=num1/sum(ind_col_prec);
+%             transition{j}(i,i+1)=num2/sum(ind_col_prec);
+%         end
+%     end
+%     for k=M:sum(C(1,:))
+%         transition{k}(i,:)=transition{M}(i,:);
+%     end
+% end
+% for i=2
+%     M=max(C(:,i));
+%     for j=1:M
+%         ind_col=C(:,i)>j;
+%         ind_col_prec=C(:,i)>=j;
+%         ind_colb1=C(:,2)>j;
+%         ind_colc=C(:,i)==j;
+%         if sum(ind_colb1)==0
+%             if (sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))==0
+%                 transition{j}(i,i)=eps;
+%                 transition{j}(i,i+1)=eps;
+%                 transition{j}(i,i+2)=sum(C(ind_colc,3)==0)/sum(ind_col_prec)-2*eps;
+%             else
+%                 if sum(ind_colc)==0
+%                     transition{j}(i,i)=eps;
+%                     transition{j}(i,i+1)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec)-2*eps;
+%                     transition{j}(i,i+2)=eps;
+%                 else
+%                     transition{j}(i,i)=eps;
+%                     transition{j}(i,i+1)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec)-1/2*eps;
+%                     transition{j}(i,i+2)=sum(C(ind_colc,3)==0)/sum(ind_col_prec)-1/2*eps;
+%                 end
+%             end
+%         else
+%             if (sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))==0
+%                 if sum(ind_colc)==0
+%                     transition{j}(i,i)=sum(ind_colb1)/sum(ind_col_prec)-2*eps;
+%                     transition{j}(i,i+1)=eps;
+%                     transition{j}(i,i+2)=eps;
+%                 else
+%                     transition{j}(i,i)=sum(ind_colb1)/sum(ind_col_prec)-1/2*eps;
+%                     transition{j}(i,i+1)=eps;
+%                     transition{j}(i,i+2)=sum(C(ind_colc,3)==0)/sum(ind_col_prec)-1/2*eps;
+%                 end
+%             else
+%                 if sum(ind_colc)==0
+%                     transition{j}(i,i)=sum(ind_colb1)/sum(ind_col_prec)-1/2*eps;
+%                     transition{j}(i,i+1)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec)-1/2*eps;
+%                     transition{j}(i,i+2)=eps;
+%                 else
+%                     transition{j}(i,i)=sum(ind_colb1)/sum(ind_col_prec);
+%                     transition{j}(i,i+2)=sum(C(ind_colc,3)==0)/sum(ind_col_prec);
+%                     transition{j}(i,i+1)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec);
+%                 end
+%             end
+%         end
+% 
+%     end
+%     for k=M:sum(C(1,:))
+%         transition{k}(i,:)=transition{M}(i,:);
+%     end
+% end
+% end
+% % B1 B2 C
+% % 0  0  1
+% % 0  1  0
+% % 0  1  1
+% % 1  0  0
+% % 1  0  1
+% % 1  1  0
+% % 
+% % si 0
+% %     si 0
+% %     sinon
+% %         si 0
+% %         sinon
+% % sinon
+% %     si 0
+% %         si 0
+% %         sinon
+% %     sinon
+% %         si 0
+% %         sinon
+% % %% nombre de transitions
+% % ind_col=C(:,2)==4 %on trouve les indices
+% % C(ind_col,:) %toutes les lignes de la colonne 2 qui est égale à 4
+% % %% vers C
+% % sum(C(ind_col,3)==0) %on trouve le nombre de transition vers C
+% 
+% % %% nombre de non-transitions (reste sur B1)
+% % ind_col=C(:,2)>4 (modifie) 
+% %sum(ind_col)
+% %sum(a==2)
diff --git a/parmorceauxMax-git/matrice_transition.m b/parmorceauxMax-git/matrice_transition.m
new file mode 100644
index 0000000000000000000000000000000000000000..3d3a98165a14641bb8ca5437f47dd1935dee5716
--- /dev/null
+++ b/parmorceauxMax-git/matrice_transition.m
@@ -0,0 +1,195 @@
+function transition=matrice_transition(eps)
+%C=xlsread('p_t_test.xls');
+C=xlsread('proba_transition.xls');
+%transition=repmat({[zeros(3,4);[0 0 0 1]]},1,sum(C(1,:)));
+N=sum(C(1,:));
+A=repmat({zeros(1,N)}, 3, 4);
+B=repmat({zeros(1,N)}, 1, 3);
+transition=[A; [B, {ones(1,N)}]];
+for i=[1,3]
+    M=max(C(:,i));
+    for j=1:M
+        ind_col=C(:,i)>j
+        ind_col_prec=C(:,i)>=j
+        num1=sum(ind_col)
+        num2=(sum(ind_col_prec)-sum(ind_col))
+        if sum(ind_col)==0
+            transition{i,i}(j)=eps;
+            transition{i,i+1}(j)=num2/sum(ind_col_prec)-eps
+        elseif (sum(ind_col_prec)-sum(ind_col))==0
+            transition{i,i}(j)=num1/sum(ind_col_prec)-eps
+            transition{i,i+1}(j)=eps;
+        else
+            transition{i,i}(j)=num1/sum(ind_col_prec);
+            transition{i,i+1}(j)=num2/sum(ind_col_prec);
+        end
+    end
+    for k=M:sum(C(1,:))
+        transition{i,i}(k)=transition{i,i}(M);
+        transition{i,i+1}(k)=transition{i,i+1}(M);
+    end
+end
+for i=2
+    M=max(C(:,i));
+    for j=1:M
+        ind_col=C(:,i)>j;
+        ind_col_prec=C(:,i)>=j;
+        ind_colb1=C(:,2)>j;
+        ind_colc=C(:,i)==j;
+        if sum(ind_colb1)==0
+            if (sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))==0
+                transition{i,i}(j)=eps;
+                transition{i,i+1}(j)=eps;
+                transition{i,i+2}(j)=sum(C(ind_colc,3)==0)/sum(ind_col_prec)-2*eps;
+            else
+                if sum(ind_colc)==0
+                    transition{i,i}(j)=eps;
+                    transition{i,i+1}(j)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec)-2*eps;
+                    transition{i,i+2}(j)=eps;
+                else
+                    transition{i,i}(j)=eps;
+                    transition{i,i+1}(j)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec)-1/2*eps;
+                    transition{i,i+2}(j)=sum(C(ind_colc,3)==0)/sum(ind_col_prec)-1/2*eps;
+                end
+            end
+        else
+            if (sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))==0
+                if sum(ind_colc)==0
+                    transition{i,i}(j)=sum(ind_colb1)/sum(ind_col_prec)-2*eps;
+                    transition{i,i+1}(j)=eps;
+                    transition{i,i+2}(j)=eps;
+                else
+                    transition{i,i}(j)=sum(ind_colb1)/sum(ind_col_prec)-1/2*eps;
+                    transition{i,i+1}(j)=eps;
+                    transition{i,i+2}(j)=sum(C(ind_colc,3)==0)/sum(ind_col_prec)-1/2*eps;
+                end
+            else
+                if sum(ind_colc)==0
+                    transition{i,i}(j)=sum(ind_colb1)/sum(ind_col_prec)-1/2*eps;
+                    transition{i,i+1}(j)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec)-1/2*eps;
+                    transition{i,i+2}(j)=eps;
+                else
+                    transition{i,i}(j)=sum(ind_colb1)/sum(ind_col_prec);
+                    transition{i,i+2}(j)=sum(C(ind_colc,3)==0)/sum(ind_col_prec);
+                    transition{i,i+1}(j)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec);
+                end
+            end
+        end
+
+    end
+    for k=M:sum(C(1,:))
+        transition{i,i}(k)=transition{i,i}(M);
+        transition{i,i+1}(k)=transition{i,i+1}(M);
+        transition{i,i+2}(k)=transition{i,i+2}(M);
+    end
+end
+end
+
+
+
+
+% for i=[1,3]
+%     M=max(C(:,i));
+%     for j=1:M
+%         ind_col=C(:,i)>j
+%         ind_col_prec=C(:,i)>=j
+%         num1=sum(ind_col)
+%         num2=(sum(ind_col_prec)-sum(ind_col))
+%         if sum(ind_col)==0
+%             transition{j}(i,i)=eps;
+%             transition{j}(i,i+1)=num2/sum(ind_col_prec)-eps
+%         elseif (sum(ind_col_prec)-sum(ind_col))==0
+%             transition{j}(i,i)=num1/sum(ind_col_prec)-eps
+%             transition{j}(i,i+1)=eps;
+%         else
+%             transition{j}(i,i)=num1/sum(ind_col_prec);
+%             transition{j}(i,i+1)=num2/sum(ind_col_prec);
+%         end
+%     end
+%     for k=M:sum(C(1,:))
+%         transition{k}(i,:)=transition{M}(i,:);
+%     end
+% end
+% for i=2
+%     M=max(C(:,i));
+%     for j=1:M
+%         ind_col=C(:,i)>j;
+%         ind_col_prec=C(:,i)>=j;
+%         ind_colb1=C(:,2)>j;
+%         ind_colc=C(:,i)==j;
+%         if sum(ind_colb1)==0
+%             if (sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))==0
+%                 transition{j}(i,i)=eps;
+%                 transition{j}(i,i+1)=eps;
+%                 transition{j}(i,i+2)=sum(C(ind_colc,3)==0)/sum(ind_col_prec)-2*eps;
+%             else
+%                 if sum(ind_colc)==0
+%                     transition{j}(i,i)=eps;
+%                     transition{j}(i,i+1)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec)-2*eps;
+%                     transition{j}(i,i+2)=eps;
+%                 else
+%                     transition{j}(i,i)=eps;
+%                     transition{j}(i,i+1)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec)-1/2*eps;
+%                     transition{j}(i,i+2)=sum(C(ind_colc,3)==0)/sum(ind_col_prec)-1/2*eps;
+%                 end
+%             end
+%         else
+%             if (sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))==0
+%                 if sum(ind_colc)==0
+%                     transition{j}(i,i)=sum(ind_colb1)/sum(ind_col_prec)-2*eps;
+%                     transition{j}(i,i+1)=eps;
+%                     transition{j}(i,i+2)=eps;
+%                 else
+%                     transition{j}(i,i)=sum(ind_colb1)/sum(ind_col_prec)-1/2*eps;
+%                     transition{j}(i,i+1)=eps;
+%                     transition{j}(i,i+2)=sum(C(ind_colc,3)==0)/sum(ind_col_prec)-1/2*eps;
+%                 end
+%             else
+%                 if sum(ind_colc)==0
+%                     transition{j}(i,i)=sum(ind_colb1)/sum(ind_col_prec)-1/2*eps;
+%                     transition{j}(i,i+1)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec)-1/2*eps;
+%                     transition{j}(i,i+2)=eps;
+%                 else
+%                     transition{j}(i,i)=sum(ind_colb1)/sum(ind_col_prec);
+%                     transition{j}(i,i+2)=sum(C(ind_colc,3)==0)/sum(ind_col_prec);
+%                     transition{j}(i,i+1)=(sum(ind_col_prec)-sum(ind_colb1)-sum(C(ind_colc,3)==0))/sum(ind_col_prec);
+%                 end
+%             end
+%         end
+% 
+%     end
+%     for k=M:sum(C(1,:))
+%         transition{k}(i,:)=transition{M}(i,:);
+%     end
+% end
+% end
+% % B1 B2 C
+% % 0  0  1
+% % 0  1  0
+% % 0  1  1
+% % 1  0  0
+% % 1  0  1
+% % 1  1  0
+% % 
+% % si 0
+% %     si 0
+% %     sinon
+% %         si 0
+% %         sinon
+% % sinon
+% %     si 0
+% %         si 0
+% %         sinon
+% %     sinon
+% %         si 0
+% %         sinon
+% % %% nombre de transitions
+% % ind_col=C(:,2)==4 %on trouve les indices
+% % C(ind_col,:) %toutes les lignes de la colonne 2 qui est égale à 4
+% % %% vers C
+% % sum(C(ind_col,3)==0) %on trouve le nombre de transition vers C
+% 
+% % %% nombre de non-transitions (reste sur B1)
+% % ind_col=C(:,2)>4 (modifie) 
+% %sum(ind_col)
+% %sum(a==2)
diff --git a/parmorceauxMax-git/p_t_test.xls b/parmorceauxMax-git/p_t_test.xls
new file mode 100644
index 0000000000000000000000000000000000000000..81c7064328c65c5458228cf34d5b94104be8ed35
Binary files /dev/null and b/parmorceauxMax-git/p_t_test.xls differ
diff --git a/parmorceauxMax-git/prepare_models_part2.m b/parmorceauxMax-git/prepare_models_part2.m
index 0bbd199ec8c8f9ca87317ff69c86f1e863bb4a91..0da3e085bc5f78508f06d53feb6dffa1a2db9b03 100644
--- a/parmorceauxMax-git/prepare_models_part2.m
+++ b/parmorceauxMax-git/prepare_models_part2.m
@@ -1,7 +1,7 @@
 % prepare the pdf interpolants for the dynamics model
 function prepare_models_part2
 
-load 'probaC.mat';
+load 'probaA.mat';
 
 num_dim = length(size(Proba_XY));
 dims = size(Proba_XY);
@@ -107,6 +107,6 @@ end
 interpolant_Y = griddedInterpolant(args, Proba_Y);
 
 %% save
-save('interpolants_C.mat','interpolant_XY','interpolant_Y','P_Yi_knowing_X');
+save('interpolants_A.mat','interpolant_XY','interpolant_Y','P_Yi_knowing_X');
 
 end
diff --git a/parmorceauxMax-git/probaA.mat b/parmorceauxMax-git/probaA.mat
index 8f797162fa60ba960343df01d597402c0b800719..8c8d85ccb89f8f4cedc38b14d9f7c2fab047ad8b 100644
Binary files a/parmorceauxMax-git/probaA.mat and b/parmorceauxMax-git/probaA.mat differ
diff --git a/parmorceauxMax-git/probaB1.mat b/parmorceauxMax-git/probaB1.mat
index e0e76226cb48604889353a8f1c13ad3183785f7d..3e34bce2b0d78f29a4b8a1648362bcd9d386f324 100644
Binary files a/parmorceauxMax-git/probaB1.mat and b/parmorceauxMax-git/probaB1.mat differ
diff --git a/parmorceauxMax-git/probaB2.mat b/parmorceauxMax-git/probaB2.mat
index 519e62351c9472e16d7e70b8015106545eaf400f..9087788a4eb5f20aa719d0415f2698ffee769552 100644
Binary files a/parmorceauxMax-git/probaB2.mat and b/parmorceauxMax-git/probaB2.mat differ
diff --git a/parmorceauxMax-git/probaC.mat b/parmorceauxMax-git/probaC.mat
index 7bc909534af3c86506f791f3c28eea8118274edd..bd6e1383c851afabaa2794b957ce0ac6ea8ec8a1 100644
Binary files a/parmorceauxMax-git/probaC.mat and b/parmorceauxMax-git/probaC.mat differ
diff --git a/parmorceauxMax-git/proba_transition.ods b/parmorceauxMax-git/proba_transition.ods
new file mode 100644
index 0000000000000000000000000000000000000000..dca9a777819f28bcc21718d5e396511c0bf492af
Binary files /dev/null and b/parmorceauxMax-git/proba_transition.ods differ
diff --git a/parmorceauxMax-git/proba_transition.xls b/parmorceauxMax-git/proba_transition.xls
new file mode 100644
index 0000000000000000000000000000000000000000..2e0f00b0118dd7583efdfead67c9fa7ec9b55221
Binary files /dev/null and b/parmorceauxMax-git/proba_transition.xls differ
diff --git a/parmorceauxMax-git/trans.mat b/parmorceauxMax-git/trans.mat
new file mode 100644
index 0000000000000000000000000000000000000000..170b68385ea847fcab2ce7983d9a6f23e510deb5
Binary files /dev/null and b/parmorceauxMax-git/trans.mat differ
diff --git a/training/A/probaAorigine.mat b/training/A/probaAorigine.mat
new file mode 100644
index 0000000000000000000000000000000000000000..8f797162fa60ba960343df01d597402c0b800719
Binary files /dev/null and b/training/A/probaAorigine.mat differ
diff --git a/training/B1/probaB1origine.mat b/training/B1/probaB1origine.mat
new file mode 100644
index 0000000000000000000000000000000000000000..e0e76226cb48604889353a8f1c13ad3183785f7d
Binary files /dev/null and b/training/B1/probaB1origine.mat differ
diff --git a/training/B2/probaB2origine.mat b/training/B2/probaB2origine.mat
new file mode 100644
index 0000000000000000000000000000000000000000..519e62351c9472e16d7e70b8015106545eaf400f
Binary files /dev/null and b/training/B2/probaB2origine.mat differ
diff --git a/training/B2/training/.~lock.points_courbes.xls# b/training/B2/training/.~lock.points_courbes.xls#
new file mode 100644
index 0000000000000000000000000000000000000000..644d1bd25640dafc1f1c77d3d210a84b070c8da9
--- /dev/null
+++ b/training/B2/training/.~lock.points_courbes.xls#
@@ -0,0 +1 @@
+,DESKTOP-IU67DUI/Laurie,DESKTOP-IU67DUI,02.06.2023 17:25,file:///C:/Users/Laurie/AppData/Roaming/LibreOffice/4;
\ No newline at end of file
diff --git a/training/B2/training/A/prepare_models_part1modifie.m b/training/B2/training/A/prepare_models_part1modifie.m
new file mode 100644
index 0000000000000000000000000000000000000000..55c8cfe9edcd75ae14b28335965091097ef70ad7
--- /dev/null
+++ b/training/B2/training/A/prepare_models_part1modifie.m
@@ -0,0 +1,59 @@
+% build dynamics model (part 1)
+%modele A
+Y=load('../ListeDesVolumes.txt');
+y_training=zeros(232,1);%zeros(210,1);%zeros(192,1)
+C=xlsread('../points_courbes.xls');
+
+% on normalise les patients
+J=1;
+I=1;
+ymax_training=Y;
+ymax_training=zeros(22,1);
+while (I<=22);
+    % on cherche le max du patient
+    J=1;
+    while (J<=25);
+        if Y(J,I) > ymax_training(I,1)
+            ymax_training(I,1)=Y(J,I);
+        end
+        J=J+1;
+    end
+    
+    % on normalise le patient
+    J=1;
+    while (J<=25);
+        Y(J,I) = Y(J,I) / ymax_training(I,1);
+        J=J+1;
+    end
+    
+    I=I+1;
+end
+
+% on récupère les frames qui nous intéressent
+J=1;
+I=1;
+i=1;
+while (I<=22);
+    J=1;
+    while (J<C(I,1));
+        y_training(i,1)=Y(J,I);
+        i=i+1;
+        J=J+1;
+    end
+    I=I+1;
+end
+Y_training = y_training;
+
+%creation de X_training
+k=1;
+X_training=[];
+while k<=22
+    X=[0:1/(C(k,1)-2):1];
+    X_training = [X_training, X];
+    k=k+1;
+end
+X_training=X_training';
+%X_training=repmat(X_training,18,1);
+
+
+save('trainingA.mat','X_training','Y_training')
\ No newline at end of file
diff --git a/training/B2/training/A/probaA.mat b/training/B2/training/A/probaA.mat
new file mode 100644
index 0000000000000000000000000000000000000000..352e728ccb9c5c1b14518d6dace71d0fbd34dad7
Binary files /dev/null and b/training/B2/training/A/probaA.mat differ
diff --git a/training/B2/training/A/probaA_0.06.mat b/training/B2/training/A/probaA_0.06.mat
new file mode 100644
index 0000000000000000000000000000000000000000..8c8d85ccb89f8f4cedc38b14d9f7c2fab047ad8b
Binary files /dev/null and b/training/B2/training/A/probaA_0.06.mat differ
diff --git a/training/B2/training/A/probaAorigine.mat b/training/B2/training/A/probaAorigine.mat
new file mode 100644
index 0000000000000000000000000000000000000000..8f797162fa60ba960343df01d597402c0b800719
Binary files /dev/null and b/training/B2/training/A/probaAorigine.mat differ
diff --git a/training/B2/training/A/trainingA.mat b/training/B2/training/A/trainingA.mat
new file mode 100644
index 0000000000000000000000000000000000000000..02bcb3b79de4777860b4a01f4ac21d33428a9c3b
Binary files /dev/null and b/training/B2/training/A/trainingA.mat differ
diff --git a/training/B2/training/B1/prepare_models_part1modifie.m b/training/B2/training/B1/prepare_models_part1modifie.m
new file mode 100644
index 0000000000000000000000000000000000000000..1188674ab96cad078321d9039ee7c8b99ec21ca9
--- /dev/null
+++ b/training/B2/training/B1/prepare_models_part1modifie.m
@@ -0,0 +1,72 @@
+% build dynamics model (part 1)
+%modele B1
+Y=load('../ListeDesVolumes.txt');
+y_training=zeros(159,1)%zeros(145,1);%zeros(127,1)
+C=xlsread('../points_courbes.xls');
+
+% on normalise les patients
+J=1;
+I=1;
+ymax_training=Y;
+ymax_training=zeros(22,1);
+while (I<=22);
+    % on cherche le max du patient
+    J=1;
+    while (J<=25);
+        if Y(J,I) > ymax_training(I,1)
+            ymax_training(I,1)=Y(J,I);
+        end
+        J=J+1;
+    end
+    
+    % on normalise le patient
+    J=1;
+    while (J<=25);
+        Y(J,I) = Y(J,I) / ymax_training(I,1);
+        J=J+1;
+    end
+    
+    I=I+1;
+end
+
+% on récupère les frames qui nous intéressent
+J=1;
+I=1;
+i=1;
+while (I<=22); %on parcourt tout les patients
+    J=C(I,1); %on prend que la premiere colonne du .xls
+    if C(I,3)>0 %si le patient a un plateau
+        while (J<C(I,3)); %on parcourt tout les éléments de la 3ieme colonnes J in 1:element troisieme col
+            y_training(i,1)=Y(J,I); %exp patient 1: y_training=une col 
+            i=i+1;
+            J=J+1;
+        end
+    else
+        while (J<C(I,2));
+            y_training(i,1)=Y(J,I);
+            i=i+1;
+            J=J+1;
+        end
+    end
+    I=I+1;
+end
+Y_training = y_training;
+
+%creation de X_training
+k=1;
+X_training=[];
+while k<=22
+    if C(k,3)>0
+        X=[0:1/(C(k,3)-C(k,1)-1):1];
+        X_training = [X_training, X];
+    else
+        X=[0:1/(C(k,2)-C(k,1)-1):1];
+        X_training = [X_training, X];
+    end
+    k=k+1;
+end
+X_training=X_training';
+%X_training=repmat(X_training,18,1);
+
+
+save('trainingB1.mat','X_training','Y_training')
\ No newline at end of file
diff --git a/training/B2/training/B1/probaB1.mat b/training/B2/training/B1/probaB1.mat
new file mode 100644
index 0000000000000000000000000000000000000000..3e34bce2b0d78f29a4b8a1648362bcd9d386f324
Binary files /dev/null and b/training/B2/training/B1/probaB1.mat differ
diff --git a/training/B2/training/B1/probaB1origine.mat b/training/B2/training/B1/probaB1origine.mat
new file mode 100644
index 0000000000000000000000000000000000000000..e0e76226cb48604889353a8f1c13ad3183785f7d
Binary files /dev/null and b/training/B2/training/B1/probaB1origine.mat differ
diff --git a/training/B2/training/B1/trainingB1.mat b/training/B2/training/B1/trainingB1.mat
new file mode 100644
index 0000000000000000000000000000000000000000..8408bbebc981a976b4dda294fbb24cb607f67afc
Binary files /dev/null and b/training/B2/training/B1/trainingB1.mat differ
diff --git a/training/B2/training/B2/prepare_models_part1modifie.m b/training/B2/training/B2/prepare_models_part1modifie.m
new file mode 100644
index 0000000000000000000000000000000000000000..3596ecb553b44be7a97f9a893b4a52b36c0c5997
--- /dev/null
+++ b/training/B2/training/B2/prepare_models_part1modifie.m
@@ -0,0 +1,63 @@
+% build dynamics model (part 1)
+%modele B2 %le vrai
+Y=load('../ListeDesVolumes.txt');
+y_training=zeros(88,1);%zeros(88,1);zeros(73,1)
+C=xlsread('../points_courbes.xls');
+
+% on normalise les patients
+J=1;
+I=1;
+ymax_training=Y;
+ymax_training=zeros(22,1);
+while (I<=22);
+    % on cherche le max du patient
+    J=1;
+    while (J<=25);
+        if Y(J,I) > ymax_training(I,1)
+            ymax_training(I,1)=Y(J,I);
+        end
+        J=J+1;
+    end
+    
+    % on normalise le patient
+    J=1;
+    while (J<=25);
+        Y(J,I) = Y(J,I) / ymax_training(I,1);
+        J=J+1;
+    end
+    
+    I=I+1;
+end
+
+% on récupère les frames qui nous intéressent
+J=1;
+I=1;
+i=1;
+while (I<=22);
+    J=C(I,3);
+    if C(I,3)>0
+        while (J<C(I,2));
+            y_training(i,1)=Y(J,I);
+            i=i+1;
+            J=J+1;
+        end
+    end
+    I=I+1;
+end
+Y_training = y_training;
+
+%creation de X_training
+k=1;
+X_training=[];
+while k<=22
+    if C(k,3)>0
+        X=[0:1/(C(k,2)-C(k,3)-1):1];
+        X_training = [X_training, X];
+    end
+    k=k+1;
+end
+X_training=X_training';
+%X_training=repmat(X_training,18,1);
+
+
+save('trainingB2.mat','X_training','Y_training')
diff --git a/training/B2/training/B2/probaB2.mat b/training/B2/training/B2/probaB2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..9087788a4eb5f20aa719d0415f2698ffee769552
Binary files /dev/null and b/training/B2/training/B2/probaB2.mat differ
diff --git a/training/B2/training/B2/probaB2origine.mat b/training/B2/training/B2/probaB2origine.mat
new file mode 100644
index 0000000000000000000000000000000000000000..519e62351c9472e16d7e70b8015106545eaf400f
Binary files /dev/null and b/training/B2/training/B2/probaB2origine.mat differ
diff --git a/training/B2/training/B2/trainingB2.mat b/training/B2/training/B2/trainingB2.mat
new file mode 100644
index 0000000000000000000000000000000000000000..a0f53a85617114eb1db8ccc145c6cb06c7113df5
Binary files /dev/null and b/training/B2/training/B2/trainingB2.mat differ
diff --git a/training/B2/training/C/prepare_models_part1modifie.m b/training/B2/training/C/prepare_models_part1modifie.m
new file mode 100644
index 0000000000000000000000000000000000000000..a78d790c350e5f9e5c61a637242a9e3f6e0d6603
--- /dev/null
+++ b/training/B2/training/C/prepare_models_part1modifie.m
@@ -0,0 +1,59 @@
+% build dynamics model (part 1)
+%modele C
+Y=load('../ListeDesVolumes.txt');
+y_training=zeros(71,1);%zeros(58,1);
+C=xlsread('../points_courbes.xls');
+
+% on normalise les patients
+J=1;
+I=1;
+ymax_training=Y;
+ymax_training=zeros(22,1);
+while (I<=22);
+    % on cherche le max du patient
+    J=1;
+    while (J<=25);
+        if Y(J,I) > ymax_training(I,1)
+            ymax_training(I,1)=Y(J,I);
+        end
+        J=J+1;
+    end
+    
+    % on normalise le patient
+    J=1;
+    while (J<=25);
+        Y(J,I) = Y(J,I) / ymax_training(I,1);
+        J=J+1;
+    end
+    
+    I=I+1;
+end
+
+% on récupère les frames qui nous intéressent
+J=1;
+I=1;
+i=1;
+while (I<=22);
+    J=C(I,2);
+    while (J<=25);
+        y_training(i,1)=Y(J,I);
+        i=i+1;
+        J=J+1;
+    end
+    I=I+1;
+end
+Y_training = y_training;
+
+%creation de X_training
+k=1;
+X_training=[];
+while k<=22
+    X=[0:1/(25-C(k,2)):1];
+    X_training = [X_training, X];
+    k=k+1;
+end
+X_training=X_training';
+%X_training=repmat(X_training,18,1);
+
+
+save('trainingC.mat','X_training','Y_training')
\ No newline at end of file
diff --git a/training/B2/training/C/probaC.mat b/training/B2/training/C/probaC.mat
new file mode 100644
index 0000000000000000000000000000000000000000..bd6e1383c851afabaa2794b957ce0ac6ea8ec8a1
Binary files /dev/null and b/training/B2/training/C/probaC.mat differ
diff --git a/training/B2/training/C/probaCorigine.mat b/training/B2/training/C/probaCorigine.mat
new file mode 100644
index 0000000000000000000000000000000000000000..7bc909534af3c86506f791f3c28eea8118274edd
Binary files /dev/null and b/training/B2/training/C/probaCorigine.mat differ
diff --git a/training/B2/training/C/trainingC.mat b/training/B2/training/C/trainingC.mat
new file mode 100644
index 0000000000000000000000000000000000000000..3b9a1037ef2bf355fccd71d4d7a7836f0cea44ae
Binary files /dev/null and b/training/B2/training/C/trainingC.mat differ
diff --git a/training/B2/training/ListeDesVolumes.txt b/training/B2/training/ListeDesVolumes.txt
new file mode 100644
index 0000000000000000000000000000000000000000..b406c7d918304bbbe4e83ef50920ab8c3241dddc
--- /dev/null
+++ b/training/B2/training/ListeDesVolumes.txt
@@ -0,0 +1,26 @@
+2.017900000000000000e+04	4.595000000000000000e+04	2.857200000000000000e+04	3.557800000000000000e+04	2.554000000000000000e+04	3.495200000000000000e+04	4.747500000000000000e+04	4.773200000000000000e+04	3.376800000000000000e+04	2.268700000000000000e+04	1.736900000000000000e+04	2.652400000000000000e+04	2.660500000000000000e+04	2.709200000000000000e+04	3.605400000000000000e+04	3.408500000000000000e+04	4.594800000000000000e+04	2.803600000000000000e+04	1.926700000000000000e+04	2.163700000000000000e+04	1.954400000000000000e+04	2.706000000000000000e+04
+1.976600000000000000e+04	4.366700000000000000e+04	2.741300000000000000e+04	3.383600000000000000e+04	2.484400000000000000e+04	3.148600000000000000e+04	4.420200000000000000e+04	4.456400000000000000e+04	3.171500000000000000e+04	2.247200000000000000e+04	1.652300000000000000e+04	2.640600000000000000e+04	2.531800000000000000e+04	2.706800000000000000e+04	3.484400000000000000e+04	3.201200000000000000e+04	4.275500000000000000e+04	2.691200000000000000e+04	1.902000000000000000e+04	1.804500000000000000e+04	1.934700000000000000e+04	2.273200000000000000e+04
+1.977000000000000000e+04	4.311500000000000000e+04	2.722200000000000000e+04	3.209400000000000000e+04	2.363100000000000000e+04	3.100600000000000000e+04	4.366500000000000000e+04	4.379100000000000000e+04	3.075100000000000000e+04	2.212400000000000000e+04	1.634900000000000000e+04	2.540400000000000000e+04	2.480100000000000000e+04	2.519600000000000000e+04	3.421400000000000000e+04	3.125700000000000000e+04	4.029700000000000000e+04	2.683100000000000000e+04	1.874400000000000000e+04	1.839600000000000000e+04	1.794400000000000000e+04	2.073500000000000000e+04
+1.913400000000000000e+04	4.153000000000000000e+04	2.608300000000000000e+04	3.097800000000000000e+04	2.222000000000000000e+04	3.025500000000000000e+04	4.231700000000000000e+04	4.038100000000000000e+04	2.923700000000000000e+04	2.092100000000000000e+04	1.580100000000000000e+04	2.391200000000000000e+04	2.295800000000000000e+04	2.370600000000000000e+04	3.185700000000000000e+04	2.990300000000000000e+04	3.518600000000000000e+04	2.627300000000000000e+04	1.815700000000000000e+04	1.878900000000000000e+04	1.577000000000000000e+04	1.713100000000000000e+04
+1.780200000000000000e+04	3.887800000000000000e+04	2.408000000000000000e+04	2.880700000000000000e+04	2.035200000000000000e+04	2.911200000000000000e+04	3.969300000000000000e+04	3.804300000000000000e+04	2.593200000000000000e+04	1.870700000000000000e+04	1.485800000000000000e+04	2.147700000000000000e+04	2.064300000000000000e+04	2.103900000000000000e+04	2.948100000000000000e+04	2.747100000000000000e+04	3.160000000000000000e+04	2.509800000000000000e+04	1.702000000000000000e+04	1.517800000000000000e+04	1.431800000000000000e+04	1.408500000000000000e+04
+1.588600000000000000e+04	3.541100000000000000e+04	2.122600000000000000e+04	2.446700000000000000e+04	1.797300000000000000e+04	2.772700000000000000e+04	3.738800000000000000e+04	3.593300000000000000e+04	2.261800000000000000e+04	1.602300000000000000e+04	1.337000000000000000e+04	1.926400000000000000e+04	1.665200000000000000e+04	1.791700000000000000e+04	2.687900000000000000e+04	2.287100000000000000e+04	2.690200000000000000e+04	2.303000000000000000e+04	1.368000000000000000e+04	1.375100000000000000e+04	1.279900000000000000e+04	1.138800000000000000e+04
+1.366500000000000000e+04	3.127400000000000000e+04	1.778300000000000000e+04	2.124500000000000000e+04	1.536700000000000000e+04	2.518900000000000000e+04	3.514200000000000000e+04	3.325000000000000000e+04	1.964100000000000000e+04	1.269400000000000000e+04	1.142100000000000000e+04	1.642100000000000000e+04	1.365800000000000000e+04	1.312300000000000000e+04	2.359400000000000000e+04	1.871000000000000000e+04	2.273600000000000000e+04	2.048200000000000000e+04	1.148600000000000000e+04	1.200000000000000000e+04	1.091300000000000000e+04	9.589000000000000000e+03
+1.152300000000000000e+04	2.777600000000000000e+04	1.440000000000000000e+04	1.777900000000000000e+04	1.330700000000000000e+04	2.091400000000000000e+04	3.266200000000000000e+04	2.881200000000000000e+04	1.677100000000000000e+04	1.034000000000000000e+04	9.695000000000000000e+03	1.379600000000000000e+04	1.103800000000000000e+04	9.875000000000000000e+03	2.001800000000000000e+04	1.541500000000000000e+04	2.007000000000000000e+04	1.818400000000000000e+04	9.703000000000000000e+03	1.040900000000000000e+04	9.179000000000000000e+03	8.362000000000000000e+03
+1.003000000000000000e+04	2.468400000000000000e+04	1.178500000000000000e+04	1.452600000000000000e+04	1.196400000000000000e+04	1.764800000000000000e+04	2.837900000000000000e+04	2.282100000000000000e+04	1.454600000000000000e+04	8.903000000000000000e+03	7.768000000000000000e+03	1.226800000000000000e+04	9.453000000000000000e+03	8.311000000000000000e+03	1.770300000000000000e+04	1.241400000000000000e+04	1.909400000000000000e+04	1.537200000000000000e+04	8.250000000000000000e+03	9.332000000000000000e+03	7.974000000000000000e+03	7.824000000000000000e+03
+8.939000000000000000e+03	2.226200000000000000e+04	1.016900000000000000e+04	1.136000000000000000e+04	1.133500000000000000e+04	1.578100000000000000e+04	2.429100000000000000e+04	2.012000000000000000e+04	1.332800000000000000e+04	7.947000000000000000e+03	6.748000000000000000e+03	1.127000000000000000e+04	8.820000000000000000e+03	8.105000000000000000e+03	1.631400000000000000e+04	1.118600000000000000e+04	1.637800000000000000e+04	1.354900000000000000e+04	7.261000000000000000e+03	9.682000000000000000e+03	7.012000000000000000e+03	8.599000000000000000e+03
+8.192000000000000000e+03	2.044700000000000000e+04	9.667000000000000000e+03	1.076000000000000000e+04	1.131500000000000000e+04	1.463400000000000000e+04	2.121800000000000000e+04	1.976800000000000000e+04	1.303400000000000000e+04	7.424000000000000000e+03	6.289000000000000000e+03	1.079500000000000000e+04	8.845000000000000000e+03	8.931000000000000000e+03	1.553600000000000000e+04	1.103600000000000000e+04	1.719600000000000000e+04	1.234300000000000000e+04	6.785000000000000000e+03	9.296000000000000000e+03	6.230000000000000000e+03	7.907000000000000000e+03
+7.745000000000000000e+03	1.927200000000000000e+04	9.852000000000000000e+03	1.119700000000000000e+04	1.201900000000000000e+04	1.407400000000000000e+04	1.986100000000000000e+04	2.125000000000000000e+04	1.384100000000000000e+04	7.323000000000000000e+03	6.200000000000000000e+03	1.068400000000000000e+04	9.161000000000000000e+03	1.288900000000000000e+04	1.533000000000000000e+04	1.201600000000000000e+04	1.959900000000000000e+04	1.138500000000000000e+04	6.931000000000000000e+03	9.940000000000000000e+03	5.746000000000000000e+03	8.832000000000000000e+03
+7.575000000000000000e+03	1.943300000000000000e+04	1.038700000000000000e+04	1.426500000000000000e+04	1.351200000000000000e+04	1.436000000000000000e+04	1.945500000000000000e+04	2.523000000000000000e+04	1.579800000000000000e+04	7.685000000000000000e+03	6.378000000000000000e+03	1.111100000000000000e+04	1.021800000000000000e+04	1.801300000000000000e+04	1.595300000000000000e+04	1.533400000000000000e+04	2.504400000000000000e+04	1.035600000000000000e+04	7.017000000000000000e+03	1.015600000000000000e+04	5.827000000000000000e+03	9.581000000000000000e+03
+8.001000000000000000e+03	1.979900000000000000e+04	1.164100000000000000e+04	1.824900000000000000e+04	1.578100000000000000e+04	1.531400000000000000e+04	2.024800000000000000e+04	3.277700000000000000e+04	1.962600000000000000e+04	9.002000000000000000e+03	6.719000000000000000e+03	1.265200000000000000e+04	1.425800000000000000e+04	2.191300000000000000e+04	1.729700000000000000e+04	2.024100000000000000e+04	3.037400000000000000e+04	1.000900000000000000e+04	7.391000000000000000e+03	1.024000000000000000e+04	6.672000000000000000e+03	1.205800000000000000e+04
+9.417000000000000000e+03	2.048000000000000000e+04	1.421300000000000000e+04	2.230700000000000000e+04	1.858300000000000000e+04	1.749200000000000000e+04	2.238800000000000000e+04	3.625900000000000000e+04	2.428500000000000000e+04	1.196400000000000000e+04	7.334000000000000000e+03	1.498500000000000000e+04	1.737500000000000000e+04	2.384200000000000000e+04	2.052400000000000000e+04	2.562000000000000000e+04	3.373900000000000000e+04	1.007100000000000000e+04	8.095000000000000000e+03	1.074500000000000000e+04	7.861000000000000000e+03	1.363100000000000000e+04
+1.211100000000000000e+04	2.146100000000000000e+04	1.697100000000000000e+04	2.583100000000000000e+04	2.038400000000000000e+04	2.173900000000000000e+04	2.602000000000000000e+04	3.852800000000000000e+04	2.717400000000000000e+04	1.442900000000000000e+04	8.389000000000000000e+03	1.744200000000000000e+04	1.917800000000000000e+04	2.479900000000000000e+04	2.386800000000000000e+04	2.824300000000000000e+04	3.646800000000000000e+04	1.071700000000000000e+04	9.878000000000000000e+03	1.157100000000000000e+04	1.021100000000000000e+04	1.511600000000000000e+04
+1.446000000000000000e+04	2.429300000000000000e+04	1.935800000000000000e+04	2.742300000000000000e+04	2.158600000000000000e+04	2.448200000000000000e+04	3.097000000000000000e+04	4.051400000000000000e+04	2.902500000000000000e+04	1.618700000000000000e+04	1.061000000000000000e+04	2.043600000000000000e+04	2.030300000000000000e+04	2.516600000000000000e+04	2.609400000000000000e+04	2.945100000000000000e+04	3.795000000000000000e+04	1.262400000000000000e+04	1.243700000000000000e+04	1.227300000000000000e+04	1.172300000000000000e+04	1.646000000000000000e+04
+1.609800000000000000e+04	2.818800000000000000e+04	2.095900000000000000e+04	2.868300000000000000e+04	2.231800000000000000e+04	2.652500000000000000e+04	3.429200000000000000e+04	4.378500000000000000e+04	3.026900000000000000e+04	1.727900000000000000e+04	1.222300000000000000e+04	2.228500000000000000e+04	2.084300000000000000e+04	2.544700000000000000e+04	2.758700000000000000e+04	3.022500000000000000e+04	3.880600000000000000e+04	1.486100000000000000e+04	1.421700000000000000e+04	1.375700000000000000e+04	1.356200000000000000e+04	1.784500000000000000e+04
+1.707000000000000000e+04	3.126500000000000000e+04	2.213600000000000000e+04	2.933400000000000000e+04	2.268500000000000000e+04	2.787100000000000000e+04	3.586500000000000000e+04	4.428500000000000000e+04	3.109500000000000000e+04	1.769900000000000000e+04	1.398700000000000000e+04	2.340300000000000000e+04	2.115400000000000000e+04	2.567700000000000000e+04	2.868600000000000000e+04	3.083100000000000000e+04	3.928900000000000000e+04	1.764100000000000000e+04	1.539900000000000000e+04	1.443800000000000000e+04	1.471400000000000000e+04	1.958700000000000000e+04
+1.750200000000000000e+04	3.430900000000000000e+04	2.331000000000000000e+04	2.987000000000000000e+04	2.290300000000000000e+04	2.880500000000000000e+04	3.845000000000000000e+04	4.465800000000000000e+04	3.127400000000000000e+04	1.776000000000000000e+04	1.486200000000000000e+04	2.410900000000000000e+04	2.122800000000000000e+04	2.582800000000000000e+04	2.951300000000000000e+04	3.111400000000000000e+04	3.991600000000000000e+04	1.927100000000000000e+04	1.631200000000000000e+04	1.507700000000000000e+04	1.574300000000000000e+04	2.142300000000000000e+04
+1.775100000000000000e+04	3.675500000000000000e+04	2.418400000000000000e+04	3.035000000000000000e+04	2.306500000000000000e+04	2.971900000000000000e+04	4.040700000000000000e+04	4.492500000000000000e+04	3.144300000000000000e+04	1.781600000000000000e+04	1.549200000000000000e+04	2.462700000000000000e+04	2.130100000000000000e+04	2.601000000000000000e+04	2.996100000000000000e+04	3.143500000000000000e+04	4.074800000000000000e+04	2.083100000000000000e+04	1.698000000000000000e+04	1.559700000000000000e+04	1.641500000000000000e+04	2.266700000000000000e+04
+1.781000000000000000e+04	3.941300000000000000e+04	2.476700000000000000e+04	3.100800000000000000e+04	2.335100000000000000e+04	3.056900000000000000e+04	4.343400000000000000e+04	4.528800000000000000e+04	3.153200000000000000e+04	1.814000000000000000e+04	1.592200000000000000e+04	2.494900000000000000e+04	2.158400000000000000e+04	2.601200000000000000e+04	3.046100000000000000e+04	3.159700000000000000e+04	4.103900000000000000e+04	2.232500000000000000e+04	1.761900000000000000e+04	1.641400000000000000e+04	1.699600000000000000e+04	2.374000000000000000e+04
+1.801400000000000000e+04	4.223500000000000000e+04	2.544300000000000000e+04	3.223000000000000000e+04	2.370300000000000000e+04	3.164900000000000000e+04	4.511300000000000000e+04	4.545400000000000000e+04	3.203500000000000000e+04	1.884200000000000000e+04	1.640500000000000000e+04	2.532000000000000000e+04	2.229400000000000000e+04	2.610900000000000000e+04	3.130100000000000000e+04	3.210700000000000000e+04	4.169200000000000000e+04	2.393300000000000000e+04	1.825400000000000000e+04	1.733300000000000000e+04	1.748800000000000000e+04	2.445000000000000000e+04
+1.836400000000000000e+04	4.408400000000000000e+04	2.648700000000000000e+04	3.323900000000000000e+04	2.419500000000000000e+04	3.288800000000000000e+04	4.658000000000000000e+04	4.588300000000000000e+04	3.225000000000000000e+04	2.003500000000000000e+04	1.671900000000000000e+04	2.581900000000000000e+04	2.373700000000000000e+04	2.639100000000000000e+04	3.286800000000000000e+04	3.293500000000000000e+04	4.325400000000000000e+04	2.564500000000000000e+04	1.882700000000000000e+04	1.793800000000000000e+04	1.842300000000000000e+04	2.505300000000000000e+04
+1.923300000000000000e+04	4.511000000000000000e+04	2.760900000000000000e+04	3.525700000000000000e+04	2.484700000000000000e+04	3.442000000000000000e+04	4.716400000000000000e+04	4.692700000000000000e+04	3.345200000000000000e+04	2.150200000000000000e+04	1.704100000000000000e+04	2.629300000000000000e+04	2.566600000000000000e+04	2.677800000000000000e+04	3.511800000000000000e+04	3.363500000000000000e+04	4.536500000000000000e+04	2.706900000000000000e+04	1.920400000000000000e+04	1.841100000000000000e+04	1.881800000000000000e+04	2.541000000000000000e+04
+
diff --git a/training/B2/training/points_courbes.xls b/training/B2/training/points_courbes.xls
new file mode 100644
index 0000000000000000000000000000000000000000..6ba22fd27d388651b2ebf22ebd13cebe85332159
Binary files /dev/null and b/training/B2/training/points_courbes.xls differ
diff --git a/training/C/probaCorigine.mat b/training/C/probaCorigine.mat
new file mode 100644
index 0000000000000000000000000000000000000000..7bc909534af3c86506f791f3c28eea8118274edd
Binary files /dev/null and b/training/C/probaCorigine.mat differ