How can I create a column vector by taking only the maximum values from each three values of another column matrix?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello This is only an example, say that I have a column vector of 99 rows contains number 1 to 99 such as c=[1:99]'. Now I need to deduce another column vector d from c where I will have the highest value from each of three values of C. So the first row of d will be 3 which is the highest value of first three rows of c, the second value of d will be 6 which will be the highest value of the second three rows c and so on. Values of consecutive rows are not arranged in any particular order. Can anyone help please? In this example d will come out as: d=(3:3:99)'.
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!