-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdynamicPLot.m
More file actions
52 lines (42 loc) · 1.07 KB
/
dynamicPLot.m
File metadata and controls
52 lines (42 loc) · 1.07 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
function [] = dynamicPLot(data_struct,region)
day = 1;
figure(1)
hold on
while (0 < day) && (day <= length(data_struct))
clf
cla
string = num2str(day);
subplot(2,2,1)
plotRegion(data_struct(day).data,'GW_A',region);
xlabel('Amplitude');
subplot(2,2,2)
plotRegion(data_struct(day).data,'u_137',region);
xlabel('u 137');
subplot(2,2,3)
plotRegion(data_struct(day).data,'t',region);
xlabel('t');
subplot(2,2,4)
plotRegion(data_struct(day).data,'precip',region);
xlabel('precip');
sgtitle(string)
waitforbuttonpress;
value = double(get(gcf,'CurrentCharacter'));
if value == 29 && day < length(data_struct)
day = day + 1;
continue
elseif value == 29 && day == length(data_struct)
day = 1;
continue
elseif value == 28 && day == 1
day = length(data_struct);
continue
elseif value == 28 && day > 1
day = day - 1;
elseif value == 32
day = input('Enter val');
continue
else
error('not sure')
end
end
end