How to separate data from two vectors where both vectors need to be over a threshold

1 次查看(过去 30 天)
Hi.
I have two stations with hourly data and I would like to do a correlation of the two stations but only for the values above a certain threshold, like 35. How can I make a loop that takes all the values from station 1 and station 2 above 35 into a new vector. In other words, I want only values over 35 but I want my vectors to be the same length, so only values where both stations have higher values than 35.
Example of the data:
Time Station1 Station2
40179 111 33
40179 76 32
40179 28 27
40179 28 23
40179 20 21
40179 26 21
40179 25 24
40179 27 24
40179 18 24
40179 27 19
Thank you so much in advance for helping.
Best, Kristine

采纳的回答

dpb
dpb 2014-10-15
>> ix=data(:,1)>22 & data(:,2)>22;
>> data(ix,:)
ans =
40179 111 33
40179 76 32
40179 28 27
40179 28 23
40179 26 21
40179 25 24
40179 27 24
40179 27 19
>>
I chose a different setpoint given the values in the posted set..
--
  4 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Language Fundamentals 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by