I have one week data matrix where first column is julian day and second column is time in hours and third column is my data. For each day i have 7 reference stations which are recording data at same time at 30 min time difference.

1 次查看(过去 30 天)
I need to have a plot between data and julian day on x axis, i.e for each day i will have 7 superimposed curves. please help.
clc,clear,close all d_input = uigetdir(''); filelist=dir(d_input); l=1; j=1; for m=3:length(filelist)-3 fnam1=sprintf('%s%s%s',d_input,'\',filelist(m).name); disp(filelist(m).name); xx=dir(fnam1); for j=3:length(xx) fnam2=sprintf('%s%s%s',d_input,'\',filelist(m).name,'\',xx(j).name); disp(xx(j).name); fid=fopen(fnam2) while ~feof(fid) for n=1:4 rf1=fgets(fid);
end
l=1;
for n=5:53
rf2 = fgets(fid);
rf21 = rf2(1:end);
year(l,1) = str2num(rf21(2:5));
day(l,1) =str2num(rf21(7:9));
hr(l,1) = str2num(rf21(11:12));
min(l,1)=str2num(rf21(14:15));
sec(l,1)=str2num(rf21(17:18));
pw(l,1)=str2num(rf21(50:55));
time(l,1)=hr(l)+min(l)./60 +sec(l) ./ 3600;
l=l+1;
j=j+1;
end
end
figure(m)
plot(time(1:end-1),pw(1:end-1))
hold on
clear year day min sec pw time data
end
end
with this code i am able to plot data for each day with time. but i want all days in one plot with day on x axis.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Dates and Time 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by