Filter data by flag columns

5 Ansichten (letzte 30 Tage)
Brandy
Brandy am 17 Jul. 2023
Kommentiert: dpb am 19 Jul. 2023
Below I have some code which uses a for loop to call in each day of data from some radiometry data and processes it sequentially. Now I need to add some line of code so that I can apply the flags that are in the tables. I have attached an example day of data (labeled "Lw.mat", hopefully you're able to open it). At each time point there are two rows of data, this is because there were two instruments measuring, I need to at each time point pick one of these rows to use and omit the other based on the"flag" columns. I want to first apply the "flag light availability" and "flag light quality" so that only rows which pass both of these (has a 1 in both of these columns) are included. Then I want to use the "flag sunglint (Lw)" and "flag sunglint (Rrs)" columns so that if one row shows a 0 in either flag column then it should be excluded and the row with a 1 in at least one flag column should be used, if both rows have 1's in both flag columns then the row with the lowest value in column 13 should be used. If both rows show all 0s then both rows should be excluded.
Basically I'm very lost on how to do this so any help or guidence would be appreciated, I've looked at how to apply conditioning language and if it was just one condition I would probably be alright but trying to apply so many loses me and especially how to relate it to the pair of rows at each time point.
% Specify the folder where the files live.
myFolder = 'C:\Users\tbrob\MATLAB Drive\SO298-MATLAB\MATLAB\Lw';
% Check to make sure that folder actually exists. Warn user if it doesn't.
if ~isfolder(myFolder)
errorMessage = sprintf('Error: The following folder does not exist:\n%s', myFolder);
uiwait(warndlg(errorMessage));
return;
end
% Get a list of all files in the folder with the desired file name pattern.
filePattern = fullfile(myFolder, '*Lw.dat'); % The folder has 3 different file types; we only want the Es data from each day.
theFiles = dir(filePattern);
% Plotting setup
figure; % Create a new figure
subplot(2,1,1);
hold on; % Enable hold to overlay plots
subplot(2,1,2);
hold on; % Enable hold to overlay plots
% Process each file and plot the data
for k = 1 : length(theFiles)
baseFileName = theFiles(k).name;
fullFileName = fullfile(myFolder, baseFileName);
fprintf(1, 'Now reading %s\n', fullFileName);
% Read the data file
dataArray = readtable(fullFileName);
dataArray = table2array(dataArray);
%add code which at each timepoint, pics the first or second row based
%on if it passes first the sunlight flags and then the sunglint flags
% Extract relevant data for plotting
x = 320:2:950;
y = dataArray(2:end, 13:328);
L = y(1:2:end, :);
R = y(2:2:end, :);
% Plot the data
subplot(2, 1, 1);
plot(x, L);
subplot(2, 1, 2);
plot(x, R);
end

Akzeptierte Antwort

Mathieu NOE
Mathieu NOE am 17 Jul. 2023
hello
this is my first attempt , I hope I didn't make any mistake in your requirements interpretation
still there is one case which is maybe not exactly treated as you wish : what are we suppose to do if we have for example one flag ("flag sunglint (Lw)") which has one 1 and the other flag ("flag sunglint (Rrs)") has two 1's ? for the time being my code keep both rows as valid . Only if both rows has both falgs having two 1's we do the min value search in the 13th column
this maybe needs a further improvement of the code
dataArray = Lw;
dataArray = table2array(dataArray);
%add code which at each timepoint, pics the first or second row based
%on if it passes first the sunlight flags and then the sunglint flags
[m,n] = size(dataArray);
out = []; % init
for k = 1:floor(m/2) % loop over 2 lines (rows) of data
r = (1:2)+(k-1)*2; % current 2 rows index
array = dataArray(r,:);
% I need to at each time point pick one of these rows to use and omit the other based on the"flag" columns.
% I want to first apply the "flag light availability" (C7) and "flag
% light quality" (C8) so that only rows which pass both of these (has a 1 in both of these columns)
% are included.
flag_light_availability = array(:,7); % 7th column
flag_light_quality = array(:,8); % 8th column
ind_rows1 = (flag_light_availability>0) & (flag_light_quality>0); % NB I prefer >0 instead of == 1 , it's more robust to round off / precision error
% keep the valid rows
array = array(ind_rows1,:);
% Then I want to use the "flag sunglint (Lw)" (C10) and "flag sunglint (Rrs)" (C11) columns
% the row with a 1 in at least one flag column should be used, if both rows have 1's in both flag columns
% then the row with the lowest value in column 13 should be used.
% If both rows show all 0s then both rows should be excluded.
flag_sunglint_Lw = array(:,10); % 10th column
flag_sunglint_Rrs = array(:,11); % 11th column
ind_rows2 = (flag_sunglint_Lw>0);
ind_rows3 = (flag_sunglint_Rrs>0);
% find if both rows have 1's in both flag columns
ind_rows_common = ind_rows2 & ind_rows3;
if all(ind_rows_common) % case 1 : both rows have 1's in both flag columns
% get corresponding values of column13
C13_data = array(ind_rows_common,13); % 13th column
% find which row has the lowest value in 13th col
[val,ind] = min(C13_data);
array = array(ind,:);
else % case 1 : we have only one flag == 1 => simply keep the data where one flag is == 1 (logical OR)
array = array(ind_rows2>0 | ind_rows3>0 ,:);
end
l(k) = size(array,1); % for debug only (shows how many of the 2 initial rows have been finally stored in the output)
out = [out; array]; % concat all valid data
end
% % Extract relevant data for plotting
% x = 320:2:950;
% y = dataArray(2:end, 13:328);
% L = y(1:2:end, :);
% R = y(2:2:end, :);
%
% % Plot the data
% subplot(2, 1, 1);
% plot(x, L);
% subplot(2, 1, 2);
% plot(x, R);
  2 Kommentare
Brandy
Brandy am 18 Jul. 2023
Hey thanks so much for the detailed explanation of how your code works, it really helps me to learn what is happening and how to apply it. For the case you talked about in which one row has Lw and Rrs flag =1 and the second row has flags = 0 and 1, I would like to select only the row with 1's.
I know it should be under that else statement and the else satement is saying if either flag =1 keep the row, but I'm not sure how to add if either flag=0 get rid of the row. Could I put something like
array(ind_rows2==0 | ind_rows3==0 ,:)=[];
Mathieu NOE
Mathieu NOE am 19 Jul. 2023
hello again
1) in fact I noticed that the code works fine too for this case as it will select the row whera we have a common 1's (case 2)
so for example (1 0) & (1 0) = (1 0) and we pick first row ,
same for (1 1) & (1 0) = (1 0)
or (1 0) & (1 1) = (1 0)
2) for the case "either flag=0 get rid of the row" there is nothing to do
my logic is to extract from the original array (dataArray) the valid data and store (concatenate) in array out
I am not deleting / removing rows in the original array (left untouched as you can check after running the code)
below I simply added a few more comments for case 2 so we keep track of that info, the code itself is the same as before :
dataArray = Lw;
dataArray = table2array(dataArray);
%add code which at each timepoint, pics the first or second row based
%on if it passes first the sunlight flags and then the sunglint flags
[m,n] = size(dataArray);
out = []; % init
for k = 1:floor(m/2) % loop over 2 lines (rows) of data
r = (1:2)+(k-1)*2; % current 2 rows index
array = dataArray(r,:);
% I need to at each time point pick one of these rows to use and omit the other based on the"flag" columns.
% I want to first apply the "flag light availability" (C7) and "flag
% light quality" (C8) so that only rows which pass both of these (has a 1 in both of these columns)
% are included.
flag_light_availability = array(:,7); % 7th column
flag_light_quality = array(:,8); % 8th column
ind_rows1 = (flag_light_availability>0) & (flag_light_quality>0); % NB I prefer >0 instead of == 1 , it's more robust to round off / precision error
% keep the valid rows
array = array(ind_rows1,:);
% Then I want to use the "flag sunglint (Lw)" (C10) and "flag sunglint (Rrs)" (C11) columns
% the row with a 1 in at least one flag column should be used, if both rows have 1's in both flag columns
% then the row with the lowest value in column 13 should be used.
% If both rows show all 0s then both rows should be excluded.
flag_sunglint_Lw = array(:,10); % 10th column
flag_sunglint_Rrs = array(:,11); % 11th column
ind_rows2 = (flag_sunglint_Lw>0);
ind_rows3 = (flag_sunglint_Rrs>0);
% find if both rows have 1's in both flag columns
ind_rows_common = ind_rows2 & ind_rows3;
if all(ind_rows_common) % case 1 : both rows have 1's in both flag columns
% get corresponding values of column13
C13_data = array(ind_rows_common,13); % 13th column
% find which row has the lowest value in 13th col
[val,ind] = min(C13_data);
array = array(ind,:);
else % case 2 : we have only one flag == 1 => simply keep the data where one flag is == 1 (logical OR)
% also if one row has both Lw and Rrs flag =1 and the second row has flags = 0 and 1, it will select only the common row with 1's.
array = array(ind_rows2>0 | ind_rows3>0 ,:);
end
% l(k) = size(array,1); % for debug only (shows how many of the 2 initial rows have been finally stored in the output)
out = [out; array]; % concat all valid data
end

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

dpb
dpb am 17 Jul. 2023
load Lw
%whos Lw
Lw=addvars(Lw,datetime(Lw{:,1:6}),'NewVariableNames',{'Time'},'After',{'Second'});
Lw=removevars(Lw,[1:6]);
% shorten variable names to not be so much typing, stuff taking up space...
Lw.Properties.VariableNames=strrep(Lw.Properties.VariableNames,'Flag','');
Lw.Properties.VariableNames=strrep(Lw.Properties.VariableNames,'Sung','G');
Lw.Properties.VariableNames([2:3 5:6])=extractBefore(Lw.Properties.VariableNames([2:3 5:6]),7);
Lw=addvars(Lw,Lw.LightA & Lw.LightQ,'NewVariableNames',{'LightOK'},'After','Time'); % both available and quality
Lw=addvars(Lw,Lw.GlintL | Lw.GlintR,'NewVariableNames',{'GlintOK'},'After','LightOK'); % at least one or other OK
isMin=cell2mat(rowfun(@(v)v==min(v),Lw,'groupingvariables','Time','InputVariables','VarName13', ...
'OutputVariableName',{'isMin'},'OutputFormat','cell'));
Lw=addvars(Lw,isMin,'NewVariableNames',{'isMin'},'After','LightOK');
head(Lw,20)
Time LightOK isMin GlintOK LightA LightQ Weather GlintL GlintR minRrs VarName13 VarName14 VarName15 VarName16 VarName17 VarName18 VarName19 VarName20 VarName21 VarName22 VarName23 VarName24 VarName25 VarName26 VarName27 VarName28 VarName29 VarName30 VarName31 VarName32 VarName33 VarName34 VarName35 VarName36 VarName37 VarName38 VarName39 VarName40 VarName41 VarName42 VarName43 VarName44 VarName45 VarName46 VarName47 VarName48 VarName49 VarName50 VarName51 VarName52 VarName53 VarName54 VarName55 VarName56 VarName57 VarName58 VarName59 VarName60 VarName61 VarName62 VarName63 VarName64 VarName65 VarName66 VarName67 VarName68 VarName69 VarName70 VarName71 VarName72 VarName73 VarName74 VarName75 VarName76 VarName77 VarName78 VarName79 VarName80 VarName81 VarName82 VarName83 VarName84 VarName85 VarName86 VarName87 VarName88 VarName89 VarName90 VarName91 VarName92 VarName93 VarName94 VarName95 VarName96 VarName97 VarName98 VarName99 VarName100 VarName101 VarName102 VarName103 VarName104 VarName105 VarName106 VarName107 VarName108 VarName109 VarName110 VarName111 VarName112 VarName113 VarName114 VarName115 VarName116 VarName117 VarName118 VarName119 VarName120 VarName121 VarName122 VarName123 VarName124 VarName125 VarName126 VarName127 VarName128 VarName129 VarName130 VarName131 VarName132 VarName133 VarName134 VarName135 VarName136 VarName137 VarName138 VarName139 VarName140 VarName141 VarName142 VarName143 VarName144 VarName145 VarName146 VarName147 VarName148 VarName149 VarName150 VarName151 VarName152 VarName153 VarName154 VarName155 VarName156 VarName157 VarName158 VarName159 VarName160 VarName161 VarName162 VarName163 VarName164 VarName165 VarName166 VarName167 VarName168 VarName169 VarName170 VarName171 VarName172 VarName173 VarName174 VarName175 VarName176 VarName177 VarName178 VarName179 VarName180 VarName181 VarName182 VarName183 VarName184 VarName185 VarName186 VarName187 VarName188 VarName189 VarName190 VarName191 VarName192 VarName193 VarName194 VarName195 VarName196 VarName197 VarName198 VarName199 VarName200 VarName201 VarName202 VarName203 VarName204 VarName205 VarName206 VarName207 VarName208 VarName209 VarName210 VarName211 VarName212 VarName213 VarName214 VarName215 VarName216 VarName217 VarName218 VarName219 VarName220 VarName221 VarName222 VarName223 VarName224 VarName225 VarName226 VarName227 VarName228 VarName229 VarName230 VarName231 VarName232 VarName233 VarName234 VarName235 VarName236 VarName237 VarName238 VarName239 VarName240 VarName241 VarName242 VarName243 VarName244 VarName245 VarName246 VarName247 VarName248 VarName249 VarName250 VarName251 VarName252 VarName253 VarName254 VarName255 VarName256 VarName257 VarName258 VarName259 VarName260 VarName261 VarName262 VarName263 VarName264 VarName265 VarName266 VarName267 VarName268 VarName269 VarName270 VarName271 VarName272 VarName273 VarName274 VarName275 VarName276 VarName277 VarName278 VarName279 VarName280 VarName281 VarName282 VarName283 VarName284 VarName285 VarName286 VarName287 VarName288 VarName289 VarName290 VarName291 VarName292 VarName293 VarName294 VarName295 VarName296 VarName297 VarName298 VarName299 VarName300 VarName301 VarName302 VarName303 VarName304 VarName305 VarName306 VarName307 VarName308 VarName309 VarName310 VarName311 VarName312 VarName313 VarName314 VarName315 VarName316 VarName317 VarName318 VarName319 VarName320 VarName321 VarName322 VarName323 VarName324 VarName325 VarName326 VarName327 VarName328 ____________________ _______ _____ _______ ______ ______ _______ ______ ______ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ _________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ __________ 09-May-2023 00:00:00 true true true 1 1 3 1 1 -0.009871 -0.63156 -0.61955 -0.64026 -0.72937 -0.70197 -0.55804 -0.45851 -0.40335 -0.29251 -0.19677 -0.11614 0.001355 0.15572 0.21787 0.29896 0.39899 0.50363 0.6129 0.75191 0.84233 0.88415 0.9215 0.95436 0.98103 1.0141 1.0536 1.0428 0.98146 0.91861 0.87198 0.84159 0.81551 0.79375 0.73912 0.70538 0.69254 0.66095 0.61063 0.5145 0.41859 0.32293 0.18007 -0.009983 -0.22366 -0.39447 -0.52242 -0.68015 -0.86768 -1.0295 -1.1618 -1.2646 -1.3744 -1.4913 -1.6146 -1.7474 -1.8898 -2.0711 -2.2913 -2.5305 -2.7544 -2.9631 -3.2021 -3.4716 -3.7281 -3.9312 -4.0811 -4.2162 -4.3366 -4.3876 -4.4111 -4.4071 -4.3993 -4.3877 -4.4013 -4.4332 -4.4836 -4.5727 -4.7005 -4.7898 -4.8489 -4.8781 -4.9112 -4.9483 -5.0436 -5.1389 -5.3362 -5.5368 -5.7409 -5.9046 -6.0682 -6.3315 -6.6399 -6.9934 -7.2719 -7.5504 -7.8574 -8.1 -8.2781 -8.371 -8.464 -8.6268 -8.7725 -8.9008 -9.0084 -9.1159 -9.2507 -9.3582 -9.4384 -9.4745 -9.5106 -9.6078 -9.7212 -9.851 -9.9504 -10.05 -10.159 -10.24 -10.295 -10.319 -10.343 -10.373 -10.397 -10.417 -10.44 -10.463 -10.525 -10.613 -10.728 -10.834 -10.941 -11.033 -11.04 -10.961 -10.86 -10.759 -10.793 -10.878 -11.016 -11.094 -11.172 -11.307 -11.411 -11.484 -11.483 -11.483 -11.446 -11.422 -11.411 -11.405 -11.404 -11.386 -11.354 -11.307 -11.258 -11.207 -11.174 -11.159 -11.163 -11.165 -11.165 -11.088 -10.993 -10.877 -10.731 -10.553 -10.414 -10.326 -10.291 -10.32 -10.413 -10.545 -10.635 -10.682 -10.697 -10.68 -10.641 -10.603 -10.567 -10.492 -10.378 -10.134 -9.881 -9.6192 -9.3586 -9.0991 -8.996 -8.9305 -8.9027 -8.893 -8.9014 -8.9368 -8.9863 -9.0498 -9.074 -9.0588 -8.7306 -8.3532 -7.9267 -7.4845 -7.0266 -6.8458 -6.7388 -6.7056 -6.7778 -6.9554 -7.3098 -7.6671 -8.0272 -8.2282 -8.4291 -8.6406 -8.804 -8.9194 -8.9342 -8.949 -8.7952 -8.4259 -7.8409 -7.193 -6.545 -6.1885 -6.2488 -6.726 -7.2008 -7.6756 -8.0298 -8.2768 -8.4166 -8.4543 -8.4919 -8.4336 -8.3348 -8.1955 -8.076 -7.9564 -7.8482 -7.7629 -7.7004 -7.6514 -7.6024 -7.5484 -7.4826 -7.405 -7.1357 -6.815 -6.4431 -6.0526 -5.6435 -5.4908 -5.4393 -5.4891 -5.557 -5.6431 -5.7559 -5.8674 -5.9776 -6.1431 -6.364 -6.5916 -6.7865 -6.9486 -6.9969 -7.0451 -7.014 -6.9532 -6.8626 -6.8731 -6.8837 -6.9531 -6.9916 -6.9991 -6.9436 -6.8881 -6.8799 -6.8907 -6.9203 -6.9157 -6.9009 -6.876 -6.8359 -6.7806 -6.7233 -6.638 -6.5247 -6.2941 -6.0635 -5.5171 -5.0037 -4.5233 -4.4171 -4.3109 -4.2739 -4.1787 -4.0253 -3.8239 -3.7048 -3.6681 -3.7089 -3.8271 -3.9467 -3.949 -3.8343 -3.5366 -3.0559 -2.3228 -1.7319 -1.283 -1.2026 -1.1222 -1.1498 -1.165 -1.1679 -1.1473 -1.1561 -1.1944 -1.2572 09-May-2023 00:00:00 true false false 1 1 3 0 0 0.021915 7.971 9.2342 10.51 11.229 11.814 12.267 12.778 13.349 13.956 14.401 14.683 15.097 15.642 16.204 16.712 17.166 17.504 17.726 17.997 18.6 19.534 20.619 21.855 22.33 22.522 22.431 22.486 22.688 22.587 22.26 21.709 21.538 21.75 22.615 23.233 23.604 24.674 26.443 30.37 33.38 35.471 36.898 37.661 38.164 38.672 39.183 39.515 39.669 39.426 39.171 38.903 38.293 37.341 36.641 36.525 36.991 37.891 39.223 40.249 41.173 41.995 43.009 44.216 45.131 45.762 46.11 46.374 46.553 46.901 47.121 47.213 47.199 47.078 47.041 47.131 47.35 47.634 47.984 48.028 47.805 47.315 46.698 45.954 45.883 45.812 46.131 46.22 46.079 45.613 45.148 44.638 44.232 43.932 43.611 43.291 42.407 41.562 40.756 40.687 40.618 40.899 41.171 41.434 41.57 41.706 41.744 41.633 41.372 41.127 40.881 40.702 40.576 40.504 40.469 40.433 40.217 39.958 39.655 39.425 39.195 38.907 38.589 38.24 38.013 37.786 37.591 37.472 37.43 37.431 37.432 37.161 36.724 36.12 35.751 35.382 35.064 34.874 34.812 35.055 35.299 35.601 35.782 35.841 35.693 35.545 35.248 34.989 34.768 34.523 34.254 33.926 33.613 33.316 33.014 32.707 32.656 32.639 32.657 32.672 32.684 32.443 32.142 31.783 31.396 30.98 30.634 30.471 30.49 30.654 30.961 31.245 31.416 31.475 31.459 31.367 31.217 31.078 30.95 30.662 30.215 29.346 28.536 27.786 27.057 26.349 26.027 25.815 25.712 25.642 25.606 25.696 25.785 25.873 25.759 25.444 24.283 23.146 22.032 20.911 19.785 19.292 19.049 19.057 19.391 20.05 21.025 21.949 22.823 23.341 23.859 24.329 24.659 24.849 24.771 24.694 23.901 22.573 20.712 19.247 17.782 17.44 17.882 19.106 20.188 21.269 22.212 22.866 23.232 23.237 23.243 22.985 22.64 22.206 21.883 21.561 21.256 20.981 20.735 20.621 20.508 20.333 20.058 19.683 18.774 17.861 16.945 16.031 15.12 14.852 14.776 14.892 15.056 15.268 15.546 15.858 16.201 16.667 17.257 17.707 18.085 18.391 18.436 18.481 18.336 18.181 18.016 18.03 18.044 18.131 18.116 18 17.948 17.897 17.839 17.824 17.851 17.741 17.656 17.597 17.511 17.399 17.165 16.824 16.376 15.596 14.816 13.6 12.534 11.616 11.336 11.056 10.857 10.543 10.113 9.736 9.5418 9.5308 9.6063 9.7682 9.8438 9.6862 9.2953 8.4155 7.0468 5.4878 4.2333 3.2833 3.1905 3.0977 3.0212 3.0142 3.0766 3.1072 3.2125 3.3926 NaN 09-May-2023 00:05:00 true true true 1 1 3 1 1 -0.002476 0.22569 0.37062 0.50853 0.60481 0.75716 0.96558 1.1351 1.2657 1.4503 1.6069 1.7356 1.9055 2.1166 2.2717 2.44 2.6216 2.801 2.9781 3.1411 3.28 3.3948 3.5831 3.8449 4.064 4.1965 4.2424 4.2494 4.2175 4.2213 4.1892 4.121 4.0416 3.951 4.0215 4.088 4.1503 4.2243 4.31 4.6706 5.0317 5.3933 5.6613 5.8356 5.7695 5.7331 5.7266 5.6985 5.6486 5.536 5.4289 5.3274 5.1964 5.0359 4.7922 4.6188 4.5158 4.4784 4.5067 4.5292 4.5309 4.5119 4.5042 4.5079 4.5078 4.4992 4.4823 4.4634 4.4426 4.4664 4.5012 4.547 4.5797 4.5993 4.566 4.5417 4.5265 4.4964 4.4516 4.4255 4.3876 4.3382 4.226 4.0512 3.9205 3.7898 3.6829 3.5611 3.4244 3.2404 3.0564 2.7387 2.4109 2.073 1.8155 1.558 1.2183 0.89904 0.60025 0.46218 0.32411 0.244 0.17923 0.12979 0.080549 0.03131 -0.041303 -0.11562 -0.19164 -0.25826 -0.32487 -0.43903 -0.55036 -0.65886 -0.73568 -0.8125 -0.9103 -0.995 -1.0666 -1.1187 -1.1709 -1.2237 -1.2748 -1.324 -1.3637 -1.4034 -1.4778 -1.5572 -1.6417 -1.7187 -1.7956 -1.8834 -1.957 -2.0164 -2.0744 -2.1325 -2.2542 -2.3733 -2.4897 -2.5551 -2.6204 -2.6793 -2.7226 -2.7504 -2.7586 -2.7668 -2.7689 -2.7684 -2.7652 -2.7544 -2.7359 -2.6955 -2.6622 -2.636 -2.6225 -2.6218 -2.6456 -2.6638 -2.6763 -2.6834 -2.6851 -2.6686 -2.6473 -2.6215 -2.5858 -2.5404 -2.5046 -2.481 -2.4695 -2.481 -2.5156 -2.537 -2.5493 -2.5524 -2.5515 -2.5466 -2.5243 -2.5067 -2.4937 -2.4711 -2.439 -2.3638 -2.2979 -2.2416 -2.1937 -2.1544 -2.1501 -2.1458 -2.1414 -2.1365 -2.1311 -2.1553 -2.1776 -2.1981 -2.1949 -2.1681 -2.0566 -1.947 -1.8391 -1.7501 -1.6801 -1.6521 -1.6334 -1.6239 -1.6508 -1.7141 -1.8038 -1.8881 -1.967 -2.0102 -2.0533 -2.1022 -2.1392 -2.1645 -2.1584 -2.1522 -2.0929 -1.9642 -1.766 -1.6161 -1.4661 -1.4737 -1.5649 -1.7398 -1.8119 -1.884 -1.9325 -1.9667 -1.9866 -1.9937 -2.0008 -1.9847 -1.9519 -1.9022 -1.8679 -1.8337 -1.8142 -1.7968 -1.7812 -1.7632 -1.7452 -1.7273 -1.7045 -1.6768 -1.5894 -1.5 -1.4085 -1.3222 -1.2409 -1.2298 -1.2329 -1.2503 -1.2633 -1.272 -1.3023 -1.3297 -1.3544 -1.3958 -1.4538 -1.4976 -1.5368 -1.5714 -1.5717 -1.572 -1.5656 -1.5591 -1.5526 -1.5525 -1.5523 -1.5774 -1.5833 -1.5701 -1.5628 -1.5556 -1.5466 -1.547 -1.5568 -1.5422 -1.5316 -1.5251 -1.5127 -1.4947 -1.5001 -1.4767 -1.4245 -1.3429 -1.2614 -1.1182 -1.0012 -0.91036 -0.91847 -0.92659 -0.90773 -0.8697 -0.81251 -0.75387 -0.72579 -0.72829 -0.74788 -0.78457 -0.81331 -0.80644 -0.76396 -0.65777 -0.48788 -0.36345 -0.27404 -0.21964 -0.21116 -0.20269 -0.18161 -0.17774 -0.19108 -0.21257 -0.22003 -0.21346 -0.22234 09-May-2023 00:05:00 true false false 1 1 3 0 0 0.067192 14.762 17.103 19.593 21.283 22.542 23.372 24.328 25.41 26.591 27.474 28.06 28.844 29.826 31.058 32.181 33.195 33.961 34.48 35.018 36.169 37.93 40.182 42.923 44.203 44.752 44.568 44.744 45.28 45.3 44.774 43.701 43.235 43.375 45.239 46.533 47.259 49.237 52.468 60.409 66.741 71.465 74.941 77.169 78.532 79.859 81.149 82.171 82.924 82.906 82.774 82.527 81.611 80.024 78.624 78.48 79.592 81.788 85.068 87.701 90.035 92.07 94.612 97.66 100.09 101.82 102.83 103.63 104.23 105.12 105.68 105.91 105.9 105.67 105.55 105.76 106.3 107.05 108 108.41 108.14 107.2 105.85 104.1 104 103.9 104.91 105.47 105.59 104.79 103.99 103.09 102.58 102.43 102.26 102.09 100.58 98.961 97.224 97.061 96.898 97.894 98.809 99.645 100.14 100.64 101.06 101.11 100.8 100.37 99.953 99.698 99.667 99.859 99.962 100.06 99.975 99.66 99.119 98.691 98.263 97.913 97.496 97.01 96.662 96.313 96.263 96.32 96.483 96.585 96.686 96.253 95.119 93.284 91.898 90.513 89.619 89.212 89.293 89.797 90.3 90.837 91.309 91.714 91.823 91.931 91.77 91.696 91.709 91.743 91.797 91.334 90.751 90.047 89.281 88.452 88.133 87.986 88.01 87.931 87.748 86.829 85.819 84.719 83.523 82.231 81.351 80.868 80.781 81.264 82.316 83.421 84.081 84.295 84.339 84.214 83.884 83.578 83.297 82.732 81.883 79.651 77.463 75.319 73.237 71.219 70.617 70.224 70.039 69.924 69.88 70.187 70.552 70.976 71.038 70.738 67.917 64.759 61.266 57.822 54.426 53.231 52.579 52.469 53.264 54.964 57.894 60.724 63.453 64.922 66.39 67.82 68.906 69.648 69.583 69.519 68.159 64.937 59.852 54.817 49.782 47.672 48.73 52.955 56.733 60.512 63.339 65.253 66.255 66.349 66.444 65.928 65.124 64.031 63.182 62.334 61.565 60.925 60.415 60.092 59.769 59.4 58.816 58.016 55.705 53.109 50.228 47.269 44.23 43.367 43.17 43.641 44.264 45.04 45.944 46.849 47.754 49.115 50.93 52.538 53.897 55.006 55.199 55.393 55.033 54.539 53.909 53.962 54.014 54.558 54.718 54.493 54.323 54.153 53.951 53.917 54.05 54.061 53.973 53.788 53.544 53.241 52.669 51.852 50.79 48.811 46.832 42.82 39.146 35.809 35.124 34.439 34.158 33.37 32.074 30.799 29.991 29.648 30.021 31.11 31.826 31.635 30.535 27.732 23.226 17.907 13.493 9.9838 9.5698 9.1558 9.4282 9.6441 9.8033 9.8816 10.088 10.422 NaN 09-May-2023 00:10:00 true true true 1 1 3 1 1 -0.000322 0.41 0.57859 0.74908 0.88266 1.0568 1.2715 1.4506 1.5941 1.7881 1.9534 2.0901 2.2636 2.4741 2.6569 2.8449 3.0379 3.2263 3.4098 3.5729 3.7191 3.8485 4.0663 4.3724 4.6249 4.7774 4.8299 4.845 4.8227 4.8506 4.8269 4.7516 4.6667 4.5722 4.6849 4.7818 4.8629 4.9684 5.0983 5.5782 6.0467 6.5039 6.8659 7.1328 7.128 7.1364 7.1581 7.166 7.1602 7.0757 6.9835 6.8837 6.7495 6.581 6.3316 6.1634 6.0762 6.0745 6.1582 6.2483 6.3077 6.3365 6.3865 6.4579 6.5189 6.5594 6.5794 6.5932 6.6008 6.647 6.6963 6.7487 6.7882 6.815 6.791 6.775 6.767 6.7566 6.7438 6.7316 6.6953 6.6348 6.516 6.339 6.2095 6.08 5.9944 5.8887 5.7629 5.5851 5.4072 5.087 4.7629 4.435 4.1886 3.9421 3.5935 3.267 2.9628 2.8325 2.7022 2.6405 2.596 2.5685 2.5352 2.5018 2.4439 2.379 2.3072 2.2321 2.1569 2.0511 1.9472 1.845 1.7754 1.7058 1.6195 1.5376 1.4601 1.4091 1.3581 1.2978 1.2369 1.1753 1.1191 1.0629 0.98149 0.89732 0.81037 0.74136 0.67234 0.5812 0.49114 0.40217 0.32833 0.25449 0.15186 0.06342 -0.010841 -0.041711 -0.072581 -0.11144 -0.14238 -0.16539 -0.1697 -0.17401 -0.18195 -0.1872 -0.18974 -0.19044 -0.18928 -0.19094 -0.1918 -0.19184 -0.19489 -0.20094 -0.20588 -0.20644 -0.20262 -0.19907 -0.1958 -0.20338 -0.21177 -0.22098 -0.22433 -0.22183 -0.21093 -0.2063 -0.20795 -0.20837 -0.20755 -0.19974 -0.19087 -0.18095 -0.17 -0.15802 -0.14779 -0.13908 -0.13187 -0.12129 -0.10734 -0.093221 -0.086092 -0.08595 -0.096289 -0.11711 -0.14683 -0.16533 -0.17261 -0.17934 -0.18551 -0.1959 -0.20385 -0.20936 -0.20391 -0.18749 -0.15949 -0.1417 -0.13412 -0.14213 -0.16573 -0.18698 -0.19828 -0.19962 -0.21056 -0.23109 -0.23255 -0.2319 -0.22915 -0.21878 -0.20841 -0.19894 -0.19003 -0.1817 -0.17282 -0.16394 -0.14563 -0.11175 -0.062294 -0.053687 -0.045078 -0.097175 -0.15519 -0.21912 -0.21394 -0.20877 -0.16953 -0.14013 -0.12058 -0.11402 -0.10747 -0.10279 -0.098968 -0.096004 -0.09772 -0.099435 -0.10273 -0.10329 -0.10112 -0.10462 -0.10812 -0.10352 -0.098281 -0.092396 -0.073386 -0.05696 -0.043116 -0.04349 -0.058085 -0.073061 -0.088086 -0.10316 -0.10612 -0.09697 -0.095159 -0.0929 -0.090192 -0.095563 -0.10901 -0.10036 -0.089935 -0.077739 -0.07193 -0.066121 -0.053877 -0.046693 -0.044571 -0.051826 -0.05908 -0.057378 -0.04934 -0.034968 -0.02757 -0.020173 -0.024455 -0.028947 -0.033649 -0.02236 -0.018569 -0.022275 -0.02528 -0.027583 -0.021778 -0.015311 -0.008182 0.003638 0.015458 0.031114 0.032515 0.019662 -0.0039 -0.027462 -0.033459 -0.026939 -0.0079 0.004382 -0.000139 -0.021464 -0.029789 -0.025114 -0.044123 -0.035698 0.000163 0.030095 0.054098 0.062589 0.055552 0.032986 0.01819 0.003395 0.017279 0.018647 0.007501 0.004548 0.003694 0.004939 0.00504 09-May-2023 00:10:00 true false false 1 1 3 0 0 0.022308 6.5573 7.6225 8.716 9.391 9.9132 10.283 10.699 11.161 11.673 12.051 12.298 12.644 13.091 13.615 14.093 14.523 14.842 15.05 15.297 15.806 16.577 17.523 18.644 19.134 19.325 19.216 19.234 19.378 19.311 19.028 18.528 18.31 18.373 19.097 19.588 19.845 20.632 21.949 25.157 27.673 29.496 30.768 31.49 31.873 32.279 32.708 33.003 33.165 33.015 32.843 32.65 32.177 31.425 30.781 30.634 30.984 31.725 32.858 33.724 34.5 35.187 36.042 37.064 37.847 38.397 38.714 38.949 39.101 39.39 39.571 39.646 39.62 39.494 39.395 39.416 39.557 39.757 40.019 40.096 39.933 39.531 38.965 38.236 38.125 38.014 38.275 38.336 38.197 37.763 37.328 36.763 36.335 36.043 35.797 35.551 34.824 34.092 33.358 33.227 33.096 33.381 33.635 33.858 33.949 34.039 34.124 34.065 33.862 33.652 33.442 33.276 33.18 33.152 33.125 33.099 32.994 32.832 32.61 32.438 32.266 32.082 31.869 31.627 31.455 31.284 31.181 31.112 31.075 31.052 31.028 30.743 30.23 29.489 28.964 28.438 28.113 27.999 28.097 28.366 28.635 28.958 29.194 29.342 29.269 29.196 28.951 28.765 28.639 28.523 28.418 28.315 28.191 28.046 27.884 27.704 27.662 27.651 27.673 27.65 27.584 27.215 26.825 26.416 25.995 25.562 25.28 25.142 25.148 25.334 25.701 26.065 26.284 26.358 26.384 26.363 26.265 26.17 26.078 25.899 25.633 24.903 24.187 23.484 22.772 22.052 21.823 21.671 21.594 21.553 21.546 21.628 21.739 21.877 21.9 21.806 20.896 19.872 18.733 17.604 16.485 16.098 15.888 15.855 16.12 16.682 17.631 18.558 19.463 19.976 20.489 20.987 21.357 21.599 21.594 21.59 21.154 20.129 18.517 16.912 15.308 14.625 14.948 16.277 17.485 18.693 19.615 20.245 20.583 20.615 20.647 20.464 20.184 19.807 19.51 19.213 18.952 18.742 18.583 18.462 18.341 18.227 18.054 17.822 17.079 16.244 15.317 14.376 13.42 13.116 13.039 13.188 13.395 13.661 13.945 14.249 14.571 15.007 15.558 16.092 16.551 16.937 17.044 17.151 17.05 16.899 16.698 16.718 16.739 16.905 16.981 16.966 16.891 16.816 16.769 16.768 16.812 16.774 16.735 16.695 16.606 16.468 16.339 16.076 15.678 15.055 14.432 13.079 11.89 10.864 10.641 10.419 10.304 10.036 9.6161 9.2161 8.9852 8.9235 9.0284 9.2999 9.5558 9.5053 9.1483 8.3009 6.9629 5.3583 4.0409 3.0107 2.8585 2.7063 2.8011 2.8579 2.8768 2.925 2.9932 3.0815 NaN 09-May-2023 00:15:00 true true true 1 1 3 1 1 0.000705 0.50616 0.68412 0.86561 1.0212 1.2094 1.4302 1.6141 1.7611 1.9663 2.1389 2.2788 2.4577 2.6757 2.8543 3.0432 3.2424 3.4375 3.6284 3.7862 3.9334 4.0701 4.3004 4.6241 4.8867 5.0464 5.1031 5.1221 5.1035 5.1389 5.1205 5.0485 4.9656 4.8719 4.9922 5.097 5.186 5.3077 5.462 5.994 6.5122 7.0167 7.4227 7.7301 7.7517 7.7845 7.8284 7.8562 7.8677 7.7956 7.7124 7.6183 7.4867 7.3177 7.0599 6.8925 6.8155 6.834 6.948 7.0732 7.162 7.2145 7.2936 7.3994 7.4904 7.5544 7.5915 7.6175 7.6325 7.6877 7.7455 7.8059 7.8504 7.8789 7.8568 7.8433 7.8382 7.8357 7.8358 7.8388 7.808 7.7434 7.6153 7.4238 7.2976 7.1714 7.0962 6.9993 6.8809 6.7064 6.532 6.213 5.8948 5.5774 5.3402 5.103 4.7562 4.4282 4.1191 3.9865 3.854 3.8007 3.7685 3.7574 3.7316 3.7058 3.6557 3.5942 3.5214 3.4446 3.3677 3.2607 3.1576 3.0585 2.9932 2.9279 2.8398 2.7558 2.6759 2.6213 2.5666 2.5029 2.4384 2.3732 2.3133 2.2535 2.1706 2.0865 2.0011 1.9346 1.868 1.7817 1.6946 1.6068 1.5266 1.4464 1.3321 1.2398 1.1697 1.1431 1.1164 1.0917 1.0715 1.056 1.0507 1.0454 1.0279 1.0145 1.0053 0.99319 0.97821 0.97306 0.96468 0.95308 0.93679 0.91579 0.91057 0.90975 0.91331 0.9211 0.93312 0.92521 0.91101 0.89053 0.87189 0.85509 0.84605 0.84047 0.83835 0.83692 0.83618 0.8597 0.87715 0.88854 0.90157 0.91625 0.9221 0.92902 0.93703 0.94417 0.95046 0.94651 0.93327 0.91074 0.86991 0.81076 0.77291 0.74664 0.73196 0.72091 0.7135 0.70488 0.70136 0.70296 0.70914 0.71991 0.72639 0.71732 0.69269 0.64446 0.57259 0.51867 0.48662 0.47644 0.4682 0.46189 0.4869 0.51983 0.56068 0.58785 0.61503 0.64319 0.66761 0.6883 0.69932 0.71033 0.71762 0.72669 0.73756 0.69544 0.65333 0.54458 0.4635 0.41009 0.45679 0.50349 0.58457 0.64809 0.69405 0.70022 0.7064 0.71073 0.7111 0.70751 0.69321 0.67892 0.66345 0.65068 0.6406 0.63778 0.63496 0.62996 0.62704 0.6262 0.62819 0.62073 0.60383 0.56574 0.50646 0.46873 0.44606 0.43846 0.4375 0.44317 0.45414 0.46297 0.46966 0.48045 0.49533 0.52248 0.54648 0.56733 0.58636 0.60539 0.61412 0.61606 0.6112 0.60235 0.5935 0.59717 0.60034 0.60301 0.61251 0.62201 0.61722 0.61613 0.61875 0.60127 0.60126 0.61872 0.61558 0.59183 0.5935 0.60074 0.61354 0.60771 0.60189 0.56844 0.52201 0.4626 0.43405 0.4055 0.3844 0.37461 0.37614 0.35747 0.34778 0.34705 0.33052 0.29821 0.31543 0.32979 0.34131 0.35772 0.37901 0.33826 0.27402 0.18628 0.1758 0.16532 0.12642 0.12871 0.1722 0.15193 0.14616 0.1549 0.16662 09-May-2023 00:15:00 true false false 1 1 3 0 0 0.033473 8.0671 9.3814 10.738 11.584 12.253 12.745 13.287 13.878 14.533 15.009 15.307 15.748 16.334 16.974 17.563 18.101 18.516 18.808 19.096 19.716 20.667 21.854 23.277 23.932 24.223 24.15 24.216 24.422 24.417 24.121 23.534 23.3 23.419 24.35 25.011 25.402 26.461 28.187 32.333 35.618 38.042 39.809 40.92 41.533 42.149 42.769 43.23 43.532 43.397 43.227 43.019 42.462 41.556 40.76 40.609 41.104 42.126 43.673 44.934 46.05 47.02 48.228 49.675 50.807 51.605 52.069 52.439 52.717 53.138 53.411 53.536 53.543 53.431 53.356 53.431 53.659 53.987 54.416 54.581 54.403 53.882 53.182 52.304 52.201 52.097 52.493 52.662 52.605 52.108 51.611 51.007 50.581 50.335 50.083 49.831 48.968 48.073 47.145 47.027 46.909 47.303 47.677 48.031 48.237 48.443 48.551 48.508 48.313 48.053 47.793 47.608 47.51 47.497 47.492 47.486 47.36 47.147 46.846 46.612 46.378 46.135 45.859 45.55 45.325 45.099 44.979 44.909 44.887 44.873 44.858 44.509 43.887 42.991 42.374 41.757 41.449 41.378 41.544 41.915 42.286 42.696 42.957 43.071 42.932 42.792 42.44 42.154 41.934 41.719 41.509 41.267 41.014 40.752 40.495 40.241 40.294 40.369 40.465 40.475 40.397 39.955 39.463 38.922 38.351 37.748 37.33 37.11 37.087 37.312 37.784 38.239 38.532 38.663 38.697 38.634 38.489 38.347 38.208 37.924 37.494 36.487 35.496 34.522 33.543 32.559 32.216 31.997 31.902 31.852 31.845 31.961 32.109 32.291 32.282 32.085 30.772 29.341 27.793 26.248 24.706 24.061 23.728 23.706 24.077 24.841 26.167 27.452 28.696 29.399 30.103 30.79 31.289 31.6 31.581 31.562 30.86 29.354 27.044 24.837 22.63 21.714 22.143 23.918 25.571 27.223 28.56 29.489 30.012 30.027 30.042 29.803 29.429 28.92 28.506 28.093 27.699 27.373 27.113 26.96 26.807 26.627 26.344 25.958 24.93 23.774 22.491 21.187 19.862 19.42 19.288 19.467 19.732 20.084 20.475 20.892 21.335 21.947 22.727 23.462 24.09 24.609 24.735 24.861 24.671 24.447 24.188 24.199 24.21 24.388 24.471 24.459 24.357 24.254 24.2 24.199 24.253 24.163 24.087 24.025 23.898 23.705 23.512 23.167 22.67 21.746 20.821 19.017 17.393 15.952 15.555 15.159 15.004 14.645 14.084 13.511 13.157 13.023 13.19 13.66 13.971 13.843 13.277 12.098 10.307 7.921 6.0039 4.5557 4.3384 4.1212 4.1683 4.2112 4.2499 4.3182 4.3889 4.462 NaN 09-May-2023 00:20:00 true true true 1 1 3 1 1 -0.005831 -0.03802 0.055923 0.13304 0.16674 0.27321 0.45245 0.59224 0.69259 0.84611 0.97839 1.0894 1.2325 1.4077 1.5161 1.6414 1.7837 1.9192 2.0481 2.1894 2.2969 2.3708 2.4832 2.6343 2.7534 2.8331 2.8735 2.8749 2.8374 2.8066 2.7675 2.72 2.6734 2.6279 2.6471 2.6751 2.7119 2.7611 2.8228 3.0199 3.2036 3.3739 3.4885 3.5473 3.4643 3.4041 3.3665 3.3018 3.2101 3.102 3.0005 2.9057 2.7908 2.656 2.4786 2.3373 2.2321 2.1424 2.0681 1.9881 1.9082 1.8285 1.737 1.6339 1.5339 1.4509 1.3849 1.3217 1.2615 1.2516 1.2527 1.265 1.2751 1.2832 1.2603 1.23 1.1924 1.1358 1.0602 0.99913 0.94348 0.89329 0.82384 0.73514 0.63524 0.53534 0.39462 0.24049 0.072941 -0.090186 -0.25332 -0.51466 -0.80632 -1.1283 -1.3853 -1.6423 -1.9465 -2.2057 -2.4197 -2.5241 -2.6285 -2.7456 -2.8478 -2.9351 -3.0064 -3.0778 -3.1781 -3.2677 -3.3465 -3.4047 -3.4628 -3.5559 -3.6609 -3.778 -3.8633 -3.9486 -4.0433 -4.1222 -4.1855 -4.2258 -4.266 -4.3103 -4.3563 -4.404 -4.4454 -4.4868 -4.5732 -4.6696 -4.776 -4.8704 -4.9648 -5.0613 -5.1052 -5.0963 -5.0558 -5.0153 -5.0598 -5.1354 -5.2421 -5.2953 -5.3485 -5.4233 -5.4768 -5.5091 -5.5029 -5.4967 -5.4692 -5.4584 -5.4643 -5.4821 -5.5116 -5.5343 -5.5478 -5.5522 -5.5579 -5.565 -5.5889 -5.6103 -5.6292 -5.6326 -5.6204 -5.5733 -5.5145 -5.444 -5.3565 -5.2518 -5.1653 -5.1104 -5.0869 -5.1065 -5.1691 -5.2606 -5.3143 -5.3301 -5.3357 -5.3312 -5.3125 -5.2972 -5.2852 -5.2535 -5.2019 -5.0809 -4.9472 -4.8008 -4.6642 -4.5375 -4.5165 -4.5039 -4.4999 -4.5074 -4.5265 -4.5512 -4.5845 -4.6265 -4.6519 -4.661 -4.4895 -4.2847 -4.0465 -3.8057 -3.5622 -3.4868 -3.4464 -3.4408 -3.4883 -3.5889 -3.7971 -4.0028 -4.206 -4.2978 -4.3896 -4.5029 -4.59 -4.6512 -4.6608 -4.6705 -4.6014 -4.4014 -4.0705 -3.6878 -3.3052 -3.0963 -3.1569 -3.487 -3.7735 -4.06 -4.2607 -4.3876 -4.4408 -4.4628 -4.4847 -4.4469 -4.3902 -4.3146 -4.2525 -4.1904 -4.1407 -4.1026 -4.0761 -4.0556 -4.0352 -4.0044 -3.9747 -3.9463 -3.8066 -3.63 -3.4163 -3.192 -2.957 -2.8962 -2.8886 -2.9341 -2.989 -3.0532 -3.1161 -3.18 -3.2449 -3.3379 -3.4589 -3.6043 -3.7167 -3.7959 -3.8306 -3.8652 -3.8392 -3.7994 -3.7459 -3.7543 -3.7627 -3.8217 -3.8596 -3.8765 -3.8568 -3.8371 -3.8293 -3.828 -3.8334 -3.847 -3.843 -3.8213 -3.8096 -3.8078 -3.7819 -3.7386 -3.6779 -3.5453 -3.4126 -3.1019 -2.8085 -2.5322 -2.4719 -2.4116 -2.4434 -2.4105 -2.3129 -2.1911 -2.1182 -2.0942 -2.1159 -2.1834 -2.2549 -2.2748 -2.243 -2.0584 -1.721 -1.2771 -0.93354 -0.69036 -0.62779 -0.56523 -0.63577 -0.66363 -0.64881 -0.66055 -0.66364 -0.65806 -0.69345 09-May-2023 00:20:00 true false false 1 1 3 0 0 0.019219 6.0803 7.0724 8.0719 8.6417 9.1017 9.4521 9.8561 10.314 10.806 11.157 11.368 11.695 12.139 12.612 13.042 13.428 13.712 13.892 14.129 14.616 15.355 16.228 17.236 17.618 17.763 17.672 17.703 17.855 17.777 17.508 17.048 16.895 17.05 17.728 18.195 18.451 19.251 20.597 23.663 26.007 27.628 28.733 29.321 29.688 30.074 30.478 30.738 30.852 30.681 30.495 30.294 29.828 29.098 28.525 28.424 28.795 29.494 30.523 31.285 31.98 32.607 33.379 34.297 34.989 35.467 35.731 35.924 36.046 36.331 36.501 36.558 36.53 36.419 36.356 36.39 36.523 36.708 36.946 36.992 36.82 36.427 35.917 35.289 35.238 35.188 35.4 35.429 35.275 34.868 34.462 33.946 33.552 33.281 33.024 32.766 32.035 31.351 30.713 30.628 30.543 30.757 30.948 31.117 31.195 31.273 31.293 31.205 31.008 30.8 30.592 30.438 30.331 30.271 30.245 30.219 30.075 29.892 29.669 29.495 29.32 29.122 28.889 28.622 28.45 28.277 28.145 28.052 28 27.973 27.946 27.682 27.237 26.61 26.228 25.847 25.615 25.524 25.573 25.778 25.982 26.207 26.366 26.457 26.424 26.39 26.213 26.065 25.945 25.816 25.68 25.439 25.202 24.968 24.724 24.469 24.419 24.422 24.476 24.486 24.451 24.156 23.846 23.522 23.194 22.862 22.632 22.541 22.588 22.766 23.075 23.318 23.465 23.517 23.535 23.518 23.409 23.306 23.208 23.016 22.728 22.025 21.377 20.784 20.182 19.571 19.358 19.214 19.139 19.087 19.057 19.135 19.223 19.321 19.284 19.112 18.223 17.307 16.364 15.45 14.567 14.217 14.032 14.013 14.265 14.786 15.585 16.353 17.09 17.531 17.973 18.372 18.669 18.863 18.817 18.77 18.276 17.295 15.826 14.553 13.28 12.92 13.287 14.381 15.307 16.233 16.988 17.506 17.789 17.8 17.811 17.636 17.372 17.02 16.764 16.509 16.28 16.086 15.927 15.828 15.73 15.598 15.411 15.168 14.471 13.732 12.951 12.192 11.455 11.229 11.173 11.285 11.441 11.641 11.861 12.106 12.374 12.747 13.225 13.643 13.996 14.284 14.334 14.383 14.3 14.191 14.055 14.068 14.08 14.183 14.212 14.168 14.08 13.992 13.984 13.992 14.017 13.956 13.897 13.839 13.757 13.65 13.494 13.242 12.894 12.297 11.701 10.643 9.7196 8.929 8.7523 8.5757 8.4101 8.1439 7.777 7.4664 7.3007 7.2799 7.3887 7.6272 7.7675 7.6458 7.262 6.5356 5.4667 4.275 3.275 2.4668 2.3627 2.2587 2.2572 2.2709 2.2999 2.3627 2.438 2.5257 NaN 09-May-2023 00:25:00 true true true 1 1 3 1 1 -0.002603 -0.1621 -0.098686 -0.052083 -0.035718 0.043418 0.18532 0.30523 0.40313 0.53903 0.65506 0.75122 0.88045 1.0428 1.1597 1.2845 1.4171 1.5543 1.696 1.8356 1.9486 2.0349 2.1624 2.3313 2.48 2.5796 2.6301 2.6517 2.6443 2.656 2.6465 2.6157 2.5832 2.5492 2.6061 2.6596 2.7096 2.7702 2.8415 3.0783 3.308 3.5306 3.6926 3.7939 3.7492 3.7208 3.7084 3.6817 3.6406 3.5693 3.4993 3.4305 3.3398 3.2272 3.0742 2.9614 2.8886 2.8529 2.8545 2.8479 2.832 2.8066 2.7848 2.7665 2.7458 2.7262 2.7078 2.6939 2.6845 2.7144 2.7502 2.7917 2.8289 2.8617 2.8593 2.8563 2.8526 2.8371 2.8098 2.7894 2.762 2.7275 2.6607 2.5617 2.4773 2.3929 2.3054 2.2002 2.0774 1.9334 1.7893 1.5439 1.2821 1.004 0.78427 0.56453 0.27279 0.015608 -0.20702 -0.30286 -0.3987 -0.46637 -0.52147 -0.564 -0.6056 -0.64721 -0.70845 -0.76888 -0.82848 -0.87845 -0.92841 -1.0068 -1.0902 -1.1785 -1.2434 -1.3082 -1.3867 -1.4534 -1.5084 -1.5397 -1.571 -1.6092 -1.6475 -1.6859 -1.715 -1.7442 -1.8043 -1.8697 -1.9404 -2.003 -2.0655 -2.1336 -2.1801 -2.2051 -2.2149 -2.2248 -2.2811 -2.3438 -2.4129 -2.455 -2.4971 -2.5512 -2.598 -2.6377 -2.6506 -2.6636 -2.6622 -2.6581 -2.6514 -2.6441 -2.6361 -2.6212 -2.6063 -2.5915 -2.5749 -2.5567 -2.5493 -2.5451 -2.5442 -2.5433 -2.5425 -2.5273 -2.5036 -2.4712 -2.4323 -2.3871 -2.354 -2.3317 -2.3202 -2.329 -2.3584 -2.3922 -2.4122 -2.4183 -2.4148 -2.4018 -2.3815 -2.3624 -2.3445 -2.3203 -2.2898 -2.2253 -2.1646 -2.1076 -2.0511 -1.9951 -1.9839 -1.9794 -1.9818 -1.983 -1.983 -1.9988 -2.0144 -2.0295 -2.0344 -2.0291 -1.9519 -1.8652 -1.7689 -1.6705 -1.5699 -1.5342 -1.5127 -1.5055 -1.5199 -1.556 -1.6379 -1.7193 -1.8001 -1.8469 -1.8938 -1.9386 -1.9731 -1.9972 -1.9969 -1.9966 -1.9621 -1.8764 -1.7395 -1.5905 -1.4415 -1.364 -1.3813 -1.4934 -1.5987 -1.704 -1.7823 -1.8352 -1.8628 -1.8717 -1.8807 -1.8623 -1.8391 -1.8113 -1.7831 -1.7548 -1.7302 -1.7109 -1.697 -1.6837 -1.6705 -1.6567 -1.6404 -1.6215 -1.5593 -1.4857 -1.4006 -1.3125 -1.2215 -1.1956 -1.1867 -1.1947 -1.2073 -1.2245 -1.2451 -1.2671 -1.2904 -1.3262 -1.3747 -1.4201 -1.4573 -1.4865 -1.4982 -1.5099 -1.4973 -1.4829 -1.4665 -1.4682 -1.47 -1.4821 -1.4878 -1.4871 -1.4776 -1.4681 -1.4582 -1.4569 -1.4643 -1.4578 -1.4543 -1.4537 -1.4456 -1.43 -1.4167 -1.3964 -1.3689 -1.3173 -1.2657 -1.1557 -1.0473 -0.94027 -0.92263 -0.90498 -0.89566 -0.87549 -0.84449 -0.8139 -0.79183 -0.77828 -0.78026 -0.79779 -0.84033 -0.84587 -0.81442 -0.73896 -0.61948 -0.46272 -0.34185 -0.25685 -0.23531 -0.21378 -0.23169 -0.24413 -0.25112 -0.22804 -0.22231 -0.23394 -0.24153 09-May-2023 00:25:00 true false true 1 1 3 0 1 0.007634 3.5397 4.1415 4.7359 5.0258 5.2742 5.481 5.7137 5.9724 6.2757 6.491 6.6184 6.8149 7.0803 7.3601 7.6141 7.8423 8.013 8.1262 8.2759 8.5707 9.0106 9.5146 10.083 10.294 10.369 10.306 10.312 10.386 10.323 10.153 9.8737 9.7722 9.8482 10.246 10.518 10.663 11.107 11.849 13.552 14.838 15.706 16.261 16.504 16.632 16.783 16.956 17.042 17.039 16.88 16.721 16.563 16.253 15.79 15.435 15.334 15.487 15.812 16.31 16.658 16.976 17.263 17.619 18.044 18.35 18.561 18.676 18.754 18.796 18.947 19.045 19.089 19.086 19.036 18.991 19 19.064 19.142 19.234 19.223 19.11 18.895 18.614 18.266 18.198 18.13 18.162 18.099 17.942 17.657 17.372 16.988 16.645 16.343 16.083 15.823 15.336 14.893 14.495 14.414 14.332 14.398 14.457 14.509 14.519 14.529 14.5 14.412 14.265 14.137 14.009 13.886 13.777 13.683 13.621 13.559 13.445 13.314 13.167 13.053 12.94 12.801 12.649 12.483 12.361 12.238 12.132 12.06 12.021 11.991 11.962 11.809 11.585 11.289 11.1 10.911 10.739 10.638 10.608 10.678 10.748 10.842 10.892 10.897 10.842 10....
Now, the combination of
isBest=Lw.LightOK & Lw.GlintOK & Lw.isMin;
Those are the specific rows that match the conditions that both are ok as far as light, at least one is ok on the glint scale and if both are flagged on glint, then it deselects the one not the minimum V13 value.
  2 Kommentare
Brandy
Brandy am 18 Jul. 2023
Hey thanks so much for the answer, I had to adjust the code so that it would work in my original for loop but it works. But now I can't figure out where to put the line for plotting the new data. I just want to plot (x,y) for each file that gets brought in, and plot them ontop of eachother so "hold on", any idea where in the code it needs to go? When I put it inside the loop, after x= and y= then I get the error "vectors must be the same length".
myFolder = 'C:\Users\tbrob\MATLAB Drive\SO298-MATLAB\MATLAB\Lw';
% Check to make sure that folder actually exists. Warn user if it doesn't.
if ~isfolder(myFolder)
errorMessage = sprintf('Error: The following folder does not exist:\n%s', myFolder);
uiwait(warndlg(errorMessage));
return;
end
% Get a list of all files in the folder with the desired file name pattern.
filePattern = fullfile(myFolder, '*Lw.dat'); % The folder has 3 different file types; we only want the Es data from each day.
theFiles = dir(filePattern);
% Process each file and plot the data
for k = 1 : length(theFiles)
baseFileName = theFiles(k).name;
fullFileName = fullfile(myFolder, baseFileName);
fprintf(1, 'Now reading %s\n', fullFileName);
opts = delimitedTextImportOptions("NumVariables", 328);
% Specify range and delimiter
opts.DataLines = [51, Inf];
opts.Delimiter = "\t";
% Specify column names and types
opts.VariableNames = ["Year", "Month", "Day", "Hour", "Minute", "Second", "FlagLightAvailability", "FlagLightQuality", "FlagWeather", "FlagSunglintLw", "FlagSunglintRrs", "minRrs", "VarName13", "VarName14", "VarName15", "VarName16", "VarName17", "VarName18", "VarName19", "VarName20", "VarName21", "VarName22", "VarName23", "VarName24", "VarName25", "VarName26", "VarName27", "VarName28", "VarName29", "VarName30", "VarName31", "VarName32", "VarName33", "VarName34", "VarName35", "VarName36", "VarName37", "VarName38", "VarName39", "VarName40", "VarName41", "VarName42", "VarName43", "VarName44", "VarName45", "VarName46", "VarName47", "VarName48", "VarName49", "VarName50", "VarName51", "VarName52", "VarName53", "VarName54", "VarName55", "VarName56", "VarName57", "VarName58", "VarName59", "VarName60", "VarName61", "VarName62", "VarName63", "VarName64", "VarName65", "VarName66", "VarName67", "VarName68", "VarName69", "VarName70", "VarName71", "VarName72", "VarName73", "VarName74", "VarName75", "VarName76", "VarName77", "VarName78", "VarName79", "VarName80", "VarName81", "VarName82", "VarName83", "VarName84", "VarName85", "VarName86", "VarName87", "VarName88", "VarName89", "VarName90", "VarName91", "VarName92", "VarName93", "VarName94", "VarName95", "VarName96", "VarName97", "VarName98", "VarName99", "VarName100", "VarName101", "VarName102", "VarName103", "VarName104", "VarName105", "VarName106", "VarName107", "VarName108", "VarName109", "VarName110", "VarName111", "VarName112", "VarName113", "VarName114", "VarName115", "VarName116", "VarName117", "VarName118", "VarName119", "VarName120", "VarName121", "VarName122", "VarName123", "VarName124", "VarName125", "VarName126", "VarName127", "VarName128", "VarName129", "VarName130", "VarName131", "VarName132", "VarName133", "VarName134", "VarName135", "VarName136", "VarName137", "VarName138", "VarName139", "VarName140", "VarName141", "VarName142", "VarName143", "VarName144", "VarName145", "VarName146", "VarName147", "VarName148", "VarName149", "VarName150", "VarName151", "VarName152", "VarName153", "VarName154", "VarName155", "VarName156", "VarName157", "VarName158", "VarName159", "VarName160", "VarName161", "VarName162", "VarName163", "VarName164", "VarName165", "VarName166", "VarName167", "VarName168", "VarName169", "VarName170", "VarName171", "VarName172", "VarName173", "VarName174", "VarName175", "VarName176", "VarName177", "VarName178", "VarName179", "VarName180", "VarName181", "VarName182", "VarName183", "VarName184", "VarName185", "VarName186", "VarName187", "VarName188", "VarName189", "VarName190", "VarName191", "VarName192", "VarName193", "VarName194", "VarName195", "VarName196", "VarName197", "VarName198", "VarName199", "VarName200", "VarName201", "VarName202", "VarName203", "VarName204", "VarName205", "VarName206", "VarName207", "VarName208", "VarName209", "VarName210", "VarName211", "VarName212", "VarName213", "VarName214", "VarName215", "VarName216", "VarName217", "VarName218", "VarName219", "VarName220", "VarName221", "VarName222", "VarName223", "VarName224", "VarName225", "VarName226", "VarName227", "VarName228", "VarName229", "VarName230", "VarName231", "VarName232", "VarName233", "VarName234", "VarName235", "VarName236", "VarName237", "VarName238", "VarName239", "VarName240", "VarName241", "VarName242", "VarName243", "VarName244", "VarName245", "VarName246", "VarName247", "VarName248", "VarName249", "VarName250", "VarName251", "VarName252", "VarName253", "VarName254", "VarName255", "VarName256", "VarName257", "VarName258", "VarName259", "VarName260", "VarName261", "VarName262", "VarName263", "VarName264", "VarName265", "VarName266", "VarName267", "VarName268", "VarName269", "VarName270", "VarName271", "VarName272", "VarName273", "VarName274", "VarName275", "VarName276", "VarName277", "VarName278", "VarName279", "VarName280", "VarName281", "VarName282", "VarName283", "VarName284", "VarName285", "VarName286", "VarName287", "VarName288", "VarName289", "VarName290", "VarName291", "VarName292", "VarName293", "VarName294", "VarName295", "VarName296", "VarName297", "VarName298", "VarName299", "VarName300", "VarName301", "VarName302", "VarName303", "VarName304", "VarName305", "VarName306", "VarName307", "VarName308", "VarName309", "VarName310", "VarName311", "VarName312", "VarName313", "VarName314", "VarName315", "VarName316", "VarName317", "VarName318", "VarName319", "VarName320", "VarName321", "VarName322", "VarName323", "VarName324", "VarName325", "VarName326", "VarName327", "VarName328"];
opts.VariableTypes = ["double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double", "double"];
% Specify file level properties
opts.ExtraColumnsRule = "ignore";
opts.EmptyLineRule = "read";
% Specify variable properties
opts = setvaropts(opts, ["Year", "Month", "Day", "Hour", "Minute", "Second", "FlagLightAvailability", "FlagLightQuality", "FlagWeather", "FlagSunglintLw", "FlagSunglintRrs", "minRrs", "VarName13", "VarName14", "VarName15", "VarName16", "VarName17", "VarName18", "VarName19", "VarName20", "VarName21", "VarName22", "VarName23", "VarName24", "VarName25", "VarName26", "VarName27", "VarName28", "VarName29", "VarName30", "VarName31", "VarName32", "VarName33", "VarName34", "VarName35", "VarName36", "VarName37", "VarName38", "VarName39", "VarName40", "VarName41", "VarName42", "VarName43", "VarName44", "VarName45", "VarName46", "VarName47", "VarName48", "VarName49", "VarName50", "VarName51", "VarName52", "VarName53", "VarName54", "VarName55", "VarName56", "VarName57", "VarName58", "VarName59", "VarName60", "VarName61", "VarName62", "VarName63", "VarName64", "VarName65", "VarName66", "VarName67", "VarName68", "VarName69", "VarName70", "VarName71", "VarName72", "VarName73", "VarName74", "VarName75", "VarName76", "VarName77", "VarName78", "VarName79", "VarName80", "VarName81", "VarName82", "VarName83", "VarName84", "VarName85", "VarName86", "VarName87", "VarName88", "VarName89", "VarName90", "VarName91", "VarName92", "VarName93", "VarName94", "VarName95", "VarName96", "VarName97", "VarName98", "VarName99", "VarName100", "VarName101", "VarName102", "VarName103", "VarName104", "VarName105", "VarName106", "VarName107", "VarName108", "VarName109", "VarName110", "VarName111", "VarName112", "VarName113", "VarName114", "VarName115", "VarName116", "VarName117", "VarName118", "VarName119", "VarName120", "VarName121", "VarName122", "VarName123", "VarName124", "VarName125", "VarName126", "VarName127", "VarName128", "VarName129", "VarName130", "VarName131", "VarName132", "VarName133", "VarName134", "VarName135", "VarName136", "VarName137", "VarName138", "VarName139", "VarName140", "VarName141", "VarName142", "VarName143", "VarName144", "VarName145", "VarName146", "VarName147", "VarName148", "VarName149", "VarName150", "VarName151", "VarName152", "VarName153", "VarName154", "VarName155", "VarName156", "VarName157", "VarName158", "VarName159", "VarName160", "VarName161", "VarName162", "VarName163", "VarName164", "VarName165", "VarName166", "VarName167", "VarName168", "VarName169", "VarName170", "VarName171", "VarName172", "VarName173", "VarName174", "VarName175", "VarName176", "VarName177", "VarName178", "VarName179", "VarName180", "VarName181", "VarName182", "VarName183", "VarName184", "VarName185", "VarName186", "VarName187", "VarName188", "VarName189", "VarName190", "VarName191", "VarName192", "VarName193", "VarName194", "VarName195", "VarName196", "VarName197", "VarName198", "VarName199", "VarName200", "VarName201", "VarName202", "VarName203", "VarName204", "VarName205", "VarName206", "VarName207", "VarName208", "VarName209", "VarName210", "VarName211", "VarName212", "VarName213", "VarName214", "VarName215", "VarName216", "VarName217", "VarName218", "VarName219", "VarName220", "VarName221", "VarName222", "VarName223", "VarName224", "VarName225", "VarName226", "VarName227", "VarName228", "VarName229", "VarName230", "VarName231", "VarName232", "VarName233", "VarName234", "VarName235", "VarName236", "VarName237", "VarName238", "VarName239", "VarName240", "VarName241", "VarName242", "VarName243", "VarName244", "VarName245", "VarName246", "VarName247", "VarName248", "VarName249", "VarName250", "VarName251", "VarName252", "VarName253", "VarName254", "VarName255", "VarName256", "VarName257", "VarName258", "VarName259", "VarName260", "VarName261", "VarName262", "VarName263", "VarName264", "VarName265", "VarName266", "VarName267", "VarName268", "VarName269", "VarName270", "VarName271", "VarName272", "VarName273", "VarName274", "VarName275", "VarName276", "VarName277", "VarName278", "VarName279", "VarName280", "VarName281", "VarName282", "VarName283", "VarName284", "VarName285", "VarName286", "VarName287", "VarName288", "VarName289", "VarName290", "VarName291", "VarName292", "VarName293", "VarName294", "VarName295", "VarName296", "VarName297", "VarName298", "VarName299", "VarName300", "VarName301", "VarName302", "VarName303", "VarName304", "VarName305", "VarName306", "VarName307", "VarName308", "VarName309", "VarName310", "VarName311", "VarName312", "VarName313", "VarName314", "VarName315", "VarName316", "VarName317", "VarName318", "VarName319", "VarName320", "VarName321", "VarName322", "VarName323", "VarName324", "VarName325", "VarName326", "VarName327", "VarName328"], "ThousandsSeparator", ",");
% Import the data
Lw= readtable(fullFileName, opts);
clear opts
Lw=addvars(Lw,datetime(Lw{:,1:6}),'NewVariableNames',{'Time'},'After',{'Second'});
Lw=removevars(Lw,[1:6]);
% shorten variable names to not be so much typing, stuff taking up space...
Lw.Properties.VariableNames=strrep(Lw.Properties.VariableNames,'Flag','');
Lw.Properties.VariableNames=strrep(Lw.Properties.VariableNames,'Sung','G');
Lw.Properties.VariableNames([2:3 5:6])=extractBefore(Lw.Properties.VariableNames([2:3 5:6]),7);
Lw=addvars(Lw,Lw.LightA & Lw.LightQ,'NewVariableNames',{'LightOK'},'After','Time'); % both available and quality
Lw=addvars(Lw,Lw.GlintL | Lw.GlintR,'NewVariableNames',{'GlintOK'},'After','LightOK'); % at least one or other OK
isMin=cell2mat(rowfun(@(v)v==min(v),Lw,'groupingvariables','Time','InputVariables','VarName13', ...
'OutputVariableName',{'isMin'},'OutputFormat','cell'));
Lw=addvars(Lw,isMin,'NewVariableNames',{'isMin'},'After','LightOK');
head(Lw,20);
isBest=Lw.LightOK & Lw.GlintOK & Lw.isMin;
LwBest=Lw(isBest,:);
% Extract relevant data for plotting
x = 320:2:950;
y = LwBest(:, 11:326);
y=table2array(y);
end
dpb
dpb am 19 Jul. 2023
"I had to adjust the code so that it would work in my original for loop..."
That's part of the point was to illustrate vectorized use of MATLAB.
It wasn't/isn't clear to me precisely what the plots should be of; the thing where you introduce magic numbers to subscript is not anything that can be logically code; what's that all about and why those particular numbers? Must be some logic there, but it wasn't explained as to why/what it was to be able to do anything with/about...
"... I get the error "vectors must be the same length"."
There's an indexing issue with the selection of the arrays in that one goes from the first row while another starts at the second--that causes a mismatch in lengths. What was up with that? Although I noticed there was a negative value for one of the variables in that first row that maybe disqualified it? If that's the deal, that should also be handled logically.
You had a very good table to start with; use it or, if you don't want the table, then use readmatrix instead of readtable; switching back and forth just wastes code and perhaps memory; there's no real reason to use both storage formats for the same data/code.
"...and plot them on top of eachother so "hold on","
You can put hold first if you need to plot into the same axis sequentially, but plot is vectorized; it will plot multiple lines at one time; each column passed is considered a separate variable to be plotted against the corresponding x; the x values can be a vector while y is an array as long as the lengths are matching -- that's why you don't want to select different array sizes but use logic operations on the data. If some values aren't to be shown, then set them to NaN with the logical; they will be silently ignored by the plot routines.
Then, the whole thing is one call to plot for each file.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Dates and Time finden Sie in Help Center und File Exchange

Produkte


Version

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by