Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Extracting Data From an Array Determined by the Data Value
조회 수: 1 (최근 30일)
이전 댓글 표시
I have uploaded a txt file containing a large number of rows, and five columns. The first 4 columns are values collected from instrumentation in a test facility, and my 5th column is filled with time values when the data was collected. I can place the data into an array, but I would like to reduce the data depending on the time value. For example, I would like data from all four of my instrumentation readings between 8 seconds and 10 seconds.
댓글 수: 0
답변 (1개)
Peng Li
2020년 3월 23일
what don't you index your array by the last column?
for example, myData is the array you mentioned with five columns, and suppose your last column is in unit second. Try:
subSet = myData(myData(:, 5) >= 8 & myData(:, 5) < 10, :);
댓글 수: 0
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!