forked from dmtburke/wrf-mat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
showmatfiles.m
42 lines (29 loc) · 860 Bytes
/
showmatfiles.m
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
function [output] = showmatfiles(lonlat)
% Use geoshow to display the .mat files in the current directory which
% intersect the square given by lonlat
% lonlat = [ lonMin lonMax latMin latMax ]
if ~exist('lonlat', 'var')
disp('Using default US box, [-130 -70 20 60].');
lonlat = [-130 -70 20 60];
else
disp('Using');
disp(lonlat);
end
d=dir('*.mat');d={d.name};
output = [];
for i=1:length(d)
load(d{i});
if fminRange(u, lonlat)
disp(['Drawing ' d{i} '...']);
axis(lonlat);
xlabel('Longitude (deg)')
ylabel('Latitude (deg)')
geoshow(u.lat, u.long, u.data, cmapmod14);
hold on
output{length(output)+1} = d{i};
else
disp(['Skipping ' d{i} '...']);
end
end
hold off
end