Create a column with maximum values of data
Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
Ältere Kommentare anzeigen
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 Kommentare
David Hill
am 1 Okt. 2019
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
am 1 Okt. 2019
Please attach two sample txt files, so that we can respond you with details.
Antworten (0)
Diese Frage ist geschlossen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!