-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloopResamplefunction.m
More file actions
executable file
·66 lines (48 loc) · 1.8 KB
/
loopResamplefunction.m
File metadata and controls
executable file
·66 lines (48 loc) · 1.8 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
%% This Script uses create_surf_gif function to create a gif file to show a
% time series of how the data changes
% 1.5th step ( to visualise data )
% uses create_surf_gif function
% created by Denny. Last updated 3 October 2023.
clear
% add path for the create_aoi_coords function
addpath '/Users/denny/OneDrive - Nanyang Technological University/Y4/FYP/H8_Codes'
Data_Folder = ...
'/Users/denny/OneDrive - Nanyang Technological University/Y4/FYP/H8_Cloud_Product/';
%------------------------Config to change-------------
Volcano = 'Sinabung';
YYYYMM = '201906';
DD = '03';
DayNight = 'Night';
%------------------------------------------------------
foldername = [Volcano,'_',YYYYMM,DD,'_',DayNight];
matfilename = [Volcano,'_',YYYYMM,DD,'_',DayNight,'.mat'];
cd([Data_Folder,foldername])
% check if file exists
if exist ([Data_Folder,foldername,'/',matfilename], 'file')
load (matfilename)
else
error ('File does not exist!')
end
clear("lat")
clear("lon")
%%
% Get a list of variable names in the workspace
variableNames = who;
% Loop through the variable names
for i = 1:numel(variableNames)
try
% Get the current variable name from the list
currentVarName = variableNames{i};
% Use evalin to retrieve the variable from the workspace
currentVarValue = evalin('base', currentVarName);
% Call the create_surf_gif function with the retrieved variable as an argument
%create_surf_gif(currentVarValue, currentVarName);
% call histoplot function
%histoplot(currentVarValue,1)
KSTestResults.(variableNames{i}) = ...
performKStest_function(currentVarValue); % [variableNames{2},'_KSTest']
end
end
ksfilename = [Volcano,'_',YYYYMM,DD,'_',DayNight,'KSTest.mat'];
% specify which variables to be saved depending on what is to be read.
save(ksfilename,"KSTestResults")