find values in a matrix above a threshold
113 views (last 30 days)
My matrix has:
column A: Month
column B: Day
column C: Year
column D: Discharge
I need to know the Month, Day, Year and the discharge that goes above threshold in a time series of data that goes from 01-01-2000 to 12-31-2099.
So far I have only been able to get the discharge that goes above the threshold when I make each column a vector but I need all the information.
Once I have the date and the discharge I need to create a table to include in a figure.
Nishitha Ayyalapu on 17 Oct 2013
Let "M" be the matrix with its 1st column as month, 2nd as Day, 3rd as year, 4th as discharge. Since "threshold" is only over discharge.
you can do this to find all the rows (Month,Day,Year,discharge) that are above threshold:
Hope this gives a good start to your problem
Azzi Abdelmalek on 17 Oct 2013
Edited: Azzi Abdelmalek on 17 Oct 2013
If M is your matrix
M=[1 1 1999 15;1 1 2000 25;11 15 2020 12 ;12 31 2099 26;12 14 2100 27]
N(:,1:3)=M(:,[3 1 2]);
idx=T>=d1 & T<=d2;