Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Created a variable based on a for loop iteration - need output table with all iterations
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
So I used the following program to separate thirty years of daily data into water years:
filename = "CatchmentData"
Emba = xlsread(filename, 'Embarras'); %reads sheet named 'Pemigewasset', etc.
Gila = xlsread(filename, 'Gila');
Oost = xlsread(filename, 'Oostanaula');
Pease = xlsread(filename, 'Pease');
Pemi = xlsread(filename, 'Pemigewasset');
%%Identify hydrologic years and generate yearly data
%10/01 to 09/30. The hydrologic year is designated by the year in which it
%ends
%Embarras River
disp('starting Embarras River');
for ii=1:29;
YrEnd = find(Emba(:,4)==930); %finds locations of cells with mo/day=9/30
YrStart = find(Emba(:,4)==1001); %finds locations of cells with mo/day=10/01
Yr = Emba(YrStart(0+ii,:):YrEnd(1+ii,:),:); %calls all columns from row at start of yr to end of yr
EmbaY(ii,:) = ii; %labels the year #
end
EmbaY = EmbaY+1971; %turns year# back into actual year
What I want to be able to do from here is take each year of data, sort one of the columns from smallest to largest, rank those values from 1 to 365 or 366 if a leap year, and then calculate the exceedance probability (1-(rank/m+n)) for each daily value. Then I want to plot the exceedance probabilities against the original value (streamflow) so that I have 29 or 30 plots on the same graph - one for each year. Then I need to rinse and repeat for four more catchments.
I think there are pretty straight forward ways to accomplish these things, but when I ran the script as is, I can only see the last iteration of the command - so the last hydrologic years worth of data that was in the original spreadsheet. So how can I take the way I separated the data into these hydrological years and then tell Excel to perform these tasks on each year's worth of daily data?
thanks.
0 Kommentare
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!