How to plot seasonal cycle
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello!
I have several .txt files that contain daily measurements of temperature and relative humidity (see attached file).
I want to plot 4 seasonal graphs, both for T and RH, for all my files.
So far what I've done is that I access all these files. But how do I continue? Thanks in advance! (I'm on Matlab 2019a)
% Variables
vars={'Temperature'; 'Relative humidity'};
years = {'2015'; '2019'};
varunits={'Celsius'; '%' };
%Starting loop for all files
for i=1:size(stations,1)
name = stations( i, 1 );
network = stations (i, 'Network');
lat = stations(i, 'Lat' );
lon = stations(i, 'Lon' );
%% Here we make the selection based on network and station
network.(1);
name.(1);
networkstr = char(network.(1));
namestr = char(name.(1));
indx = strfind (list1, namestr) ;
for j = 1:size(indx, 1)
if (indx{j,1}>0)
if (strfind (list1{j,1}, '2015') > 0)
if (strfind (list1{j,1}, 'Hourly') > 0)
if (strfind(list1{j,1}, 'txt') > 0)
disp(list1{j,1})
B = importdata(list1{j,1}, ',', 1);
Data = B.data;
Data = array2table(Data);
end
end
end
end
end
end
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Holidays / Seasons finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!