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
댓글 수: 0
채택된 답변
  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
  dpb
      
      
 2014년 10월 16일
				I presume she added it -- her hangup was selecting the subset of that data desired...
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


