From: Lukáš Jiřiště Date: Wed, 31 Jul 2024 09:54:37 +0000 (+0200) Subject: Move LevelNum out of the loop X-Git-Url: https://git.ljiriste.work/?a=commitdiff_plain;h=7f61af6f92dfc56906cb7f29eb9269f1dfa4459d;p=Bubble_column.git Move LevelNum out of the loop As it is only read from the name of the directory, there are no changes between iterations. LevelNum should eventually track the ACTUAL level. When that time comes, it will be reintroduced to the loop as an array. --- diff --git a/Bubliny.m b/Bubliny.m index 9534b11..ee11a3b 100755 --- a/Bubliny.m +++ b/Bubliny.m @@ -50,10 +50,10 @@ for iii=1:1:nSelectedDirectory % Cycles for directories with files FileName=([DirectoryName '/' SelectedDirectory{iii} '/' FileType]); FFiles = dir(FileName); % Loads files to struct FFiles(1).name, FFiles(1).folder, FFiles(1).date - i s casem nFFiles = numel(FFiles); % Counts files + LevelNum=str2double(SelectedDirectory{iii}(7:9))*1000; %% variable allocation - LevelNum = zeros(1,nFFiles); Height = zeros(1,nFFiles); Metr_fit_H = zeros(1,nFFiles); Bottom = zeros(1,nFFiles); @@ -101,12 +101,10 @@ for iii=1:1:nSelectedDirectory % Cycles for directories with files Time(jjj)=duration([(ImageName(8:9)) ':' (ImageName(10:11)) ':' (ImageName(12:16))],'Format',infmt) - start_time; infmd = ['yy' 'MM' 'dd']; Date(jjj) = datetime(ImageName(1:6),'InputFormat',infmd); - Level(jjj,1:3)=SelectedDirectory{iii}(7:9); - LevelNum(1,jjj)=str2double(Level(jjj,:))*1000; % % plot(lk,abs(pk),'oc','linewidth',2) if D_num==1 - LevelPixels=MeterScale(1+(1000-LevelNum(1,jjj))/100); % x level in pixels in the original image + LevelPixels=MeterScale(1+(1000-LevelNum)/100); % x level in pixels in the original image if jjj