Create a column with maximum values of data
정보
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
이전 댓글 표시
Hello,
I have a problem with a matlab code. I have 10 .txt files. Each file has 2 columns with 10 lines. I' ve created a code which reads my data. But I would like to take only the maximum values of one column of each file. Furthermore, I would like to create a matrix which will include the maximum values of each file one by one.
Could anyone Help me?
댓글 수: 2
David Hill
2019년 10월 1일
So you have ten 10x2 matrices. There are lots of ways to do what you want, but without additional information it is hard to say which would be the best approach. Let's say the matrices are a, b, c, d, e, f, g, h, i, j then depending on what column you want to select to take the maximum (either column 1 or 2) then:
maxArray=[max(a(:,1)),max(b(:,2)),max(c(:,1)),max(d(:,1)),max(e(:,1)),max(f(:,2)),max(g(:,1)),max(h(:,1)),max(i(:,1)),max(j(:,2))];
KALYAN ACHARJYA
2019년 10월 1일
Please attach two sample txt files, so that we can respond you with details.
답변 (0개)
이 질문은 마감되었습니다.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!