% build dynamics model (part 1) %modele B1 Y=load('ListeDesVolumes.txt'); y_training=zeros(127,1)%zeros(145,1); C=xlsread('points courbes.xls') % on normalise les patients J=1; I=1; ymax_training=Y; ymax_training=zeros(18,1); while (I<=18); % 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<=18); %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<=18 if C(k,3)>0 X=[0:1/(C(k,3)-C(k,1)):1]; X_training = [X_training, X]; else X=[0:1/(C(k,2)-C(k,1)):1]; X_training = [X_training, X]; end k=k+1; end X_training=X_training'; %X_training=repmat(X_training,18,1); save('training.mat','X_training','Y_training')