1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
| profil = 'P10';
matfile = 'pr10';
date1=load(fullfile('E:\R-TEMUS\2_donnees\RTEMUS\Dune_tracking\4_traitement_découpage_long\', profil, 'date.txt'));
for a=1:11
dir=fullfile('E:\R-TEMUS\2_donnees\RTEMUS\Dune_tracking\4_traitement_découpage_long\', profil, ['output' num2str(a)]);
for b=1:8
%charger le fichier texte créé au préalable avec le profil bathy%
rawdata=load(fullfile(dir, num2str(date1(b)), 'raw', [profil '.txt']));
dist2=rawdata(:,1);%colonne vecteur contenant l'information des coordonnées en x%
provo2=rawdata(:,2);%colonne vecteur contenant l'information d'élévation du lit%
provoNo=10;%numéro du profil%
testNm = [num2str(profil), '_', num2str(date1(b)), '_', num2str(a)];%référence du profil en sortie%
dirread1=fullfile('E:\R-TEMUS\2_donnees\RTEMUS\Dune_tracking\4_traitement_découpage_long', profil, ['output' num2str(a) '\'], date1(b), 'raw\');
dirread2=fullfile('E:\R-TEMUS\2_donnees\RTEMUS\Dune_tracking\4_traitement_découpage_long', profil, ['output' num2str(a) '\'], date1(b), 'raw\');
dirread3=fullfile('E:\R-TEMUS\2_donnees\RTEMUS\Dune_tracking\4_traitement_découpage_long', profil, ['output' num2str(a) '\'], date1(b), 'results\');
xminxmax=load(fullfile(dir, ['découpage' num2str(date1(b)) '.txt']));
if xminxmax(a,2)==0
continue
else
diffmin=abs(xminxmax(a,2)-dist2);
[~, idx1]=min(diffmin);
xbegin=dist2(idx1)/100;%début du profil considéré, ici on considère le profil 50m en amont et en aval de V2%
diffmax=abs(xminxmax(a,3)-dist2);
[~, idx2]=min(diffmax);
xend=dist2(idx2)/100;%fin du profil considéré%
%création et sauvegarde du fichier .mat dans le répertoire raw%
pr10=struct('dist2',dist2,'provo2',provo2,'provoNo',provoNo,'testNm',testNm,'xbegin',xbegin,'xend',xend);
save(fullfile(dir,num2str(date1(b)),'raw','pr10.mat'),'dist2','provo2','provoNo','testNm','xbegin','xend','pr10');
BTT(2,10,dirread1,dirread2,dirread3)
end
clear diffmax diffmin dirread1 dirread2 dirread3 pr10 testNm xbegin xend dist2 provo2 provoNo
end
end |
Partager