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!