From: foehner on 31 May 2010 01:56 Hi, i have a mat file with several stations (given with station number). I plot several parameters with a wind rose program. I loop through the stations with uniqstation = unique(stnr(:) ); for i=1:length(uniqstation) I = find( stnr(:) == uniqstation(i)); sub_dd = dd(I); sub_tl = tl(I); sub_sdate = sdate(I,:); where stnr is the station number, dd is the wind direction and tl the temperature, sdate = serial date Now I want to calculate the temperature maximum and minimum of each day for the respective stations to obtain the daily temperature amplitude (later I will plot the wind direction for different temperature amplitudes, e.g. to obtain a majority of westerly winds with large temperature amplitudes) How do I write the loop to perform this calculation? Thanks, Felix
From: dpb on 31 May 2010 08:16 foehner wrote: .... > I = find( stnr(:) == uniqstation(i)); > sub_dd = dd(I); > sub_tl = tl(I); > sub_sdate = sdate(I,:); > > where stnr is the station number, dd is the wind direction and tl the > temperature, sdate = serial date > > Now I want to calculate the temperature maximum and minimum of each day > for the respective stations to obtain the daily temperature amplitude... > How do I write the loop to perform this calculation? .... Do another selection (find) for each day (integer values, see fix() ) in the serial date and min()/max() over those. --
|
Pages: 1 Prev: Local Histogram Performance Improvement Next: bimodal histogram |