-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStruct_Data.m
More file actions
20 lines (15 loc) · 806 Bytes
/
Copy pathStruct_Data.m
File metadata and controls
20 lines (15 loc) · 806 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
%% Struct
%first a struct data structure for the cleaned data (cl_table_B0*)
% Define the list of table names
table_names = {'cl_table_B020', 'cl_table_B022', 'cl_table_B023', 'cl_table_B024', 'cl_table_B028', 'cl_table_B030', 'cl_table_B031', 'cl_table_B035', 'cl_table_B039', 'cl_table_B040'};
% Initialize an empty struct to store the data
res_Eee_Enn = struct();
% Loop through each table name and extract the data
for i = 1:length(table_names)
% Extract the data from the current table
current_data = eval(table_names{i});
% Extract the station code from the table name
station_code = extractAfter(table_names{i}, 'cl_table_');
% Store the data in the struct with the station code as the field name
res_Eee_Enn.(sprintf('res_%s', station_code)) = current_data;
end