How to plot seasonal cycle

2 次查看(过去 30 天)
Daphne PARLIARI
Daphne PARLIARI 2020-1-24
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 个)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by