How to plot seasonal cycle

조회 수: 4 (최근 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에서 Vector Volume Data에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by