Skip to content
Snippets Groups Projects
Commit e9062494 authored by adeline.paiement's avatar adeline.paiement
Browse files

Merge branch 'main' of...

parents 89983d0d 115e09b1
No related branches found
No related tags found
No related merge requests found
% build dynamics model (part 1)
%modele A
Y=load('ListeDesVolumes.txt');
y_training=zeros(192,1)%zeros(210,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);
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<=18
X=[0:1/(C(k,1)-1):1];
X_training = [X_training, X];
k=k+1;
end
X_training=X_training';
%X_training=repmat(X_training,18,1);
save('training.mat','X_training','Y_training')
\ No newline at end of file
File added
% 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')
\ No newline at end of file
File added
% build dynamics model (part 1)
%modele B2 %le vrai
Y=load('ListeDesVolumes.txt');
y_training=zeros(73,1)%zeros(88,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);
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<=18
if C(k,3)>0
X=[0:1/(C(k,2)-C(k,3)):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')
File added
% build dynamics model (part 1)
%modele C
Y=load('ListeDesVolumes.txt');
y_training=zeros(58,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);
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<=18
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('training.mat','X_training','Y_training')
\ No newline at end of file
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment