How to overlay one separate hyetograph that does not have the same interval to another?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hello, I am new to matlab. in my project, I need to overlay one areal averaged radar rainfall hyetographfor between 2:00pm and 11:00pm on June 2014, and overlay it with the rainfall hyetograph in 2006-2012.
For the first part of areal average radar, here is my code of first part:
clc
clear
load('C:\Users\pvten\OneDrive\Documents\Phd\2018Fall\CEGE\Week 5\Project2\Project2_NEXRADData.mat')
d1 = datenum(2012,6,14,14,0,0); % Starting datenumber
d2 = datenum(2012,6,14,23,0,0); % Ending datenumber
int = 1/24; % Desired time interval in days
pint = 2/24; % Sets the tick interval for plotting
dates = d1:int:d2; % Creates a vector of equally spaced dates
int = 1/24; % Desired time interval in days
pint = 2/24; % Sets the tick interval for plotting
dates = d1:int:d2; % Creates a vector of equally spaced dates
w1=1.5;
y= [41.6 22284 9714.6 112.5 2961.9 6111.9 0 35771 0 35771]; % Sum of radar
bar(dates,y,'DisplayName','Test2','FaceColor','red')
set(gca,'xtick',d1:pint:d2) % Sets certain axes parameters
datetick(gca,'x',14,'keepticks','keeplimits'); % Turns MATLAB datenumber into nicely formatted dates or times
xlabel('Time','Fontsize',12)
ylabel('Precipitation (mm/hr)','Fontsize',12)
hold on
For the second part of hyetograph, here is my code:
clc
clear
load('C:\Users\pvten\OneDrive\Documents\Phd\2018Fall\CEGE\Week 5\Project2\Project2_NEXRADData.mat')
dates = datevec(AirLake_P(:,1));
% creates matrix of year,month,day,hour,minute,second
% Creates a logical vector meeting a certain criteria
logic1 = dates(:,2)<=j & dates(:,1) == i;
% Selects the data you want using that logical vector
Qsel = AirLake_P(logic1,:);
% Check to see what the above code actually did
plot(AirLake_P(:,1),AirLake_P(:,2))
hold on
plot(Qsel(:,1),Qsel(:,2))
datetick(gca,'x',12,'keepticks','keeplimits'); % this handy function converts the large datenumber hold on
However, I have difficulty of overlayint the second hyetograph to the first one, with the range of the first one. I tried everything I can but it didn't work. Here is the result I got
Please help me how to solve it. Thank you.
0 comentarios
Respuestas (0)
Ver también
Categorías
Más información sobre Radar and EW Systems en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!