How to combine multiple .txt and calculate Mean, Std, Min, Max
Mostrar comentarios más antiguos
I have several .txt files like this
A .txt=
10 1 4
20 2 5
30 3 6
B.txt
10 7 11
20 8 12
30 9 13
C..txt
10 13 18
20 14 19
30 15 20
D.txt
10 1 4 7 11 13 18
20 2 5 8 12 14 19
30 3 6 9 13 15 20
I want to combine those file into once like in D.txt and plotting the files as first column is y ordinat [10,20,30] and others is x absis.
Then I want to calculate, mean , median, std and get max an min values of my file.
The Result like this
Mean Std Min Max
Y ordinat X absis
10 1 4 7 11 13 18 5 5.883795 -0.8838 10.8838
20 2 5 8 12 14 19 5 5.992058 -0.99206 10.99206
30 3 6 9 13 15 20 5 6.12178 -1.12178 11.12178
Any one can help? I would be appreciate.
Thanks you
Haifani
5 comentarios
Turlough Hughes
el 30 de Oct. de 2019
Are you just plugging in random values for mean, std, min, max in your table above? Or how are you planning on calculating them? the max of each row should be 18, 19, 20 respectively.
Turlough Hughes
el 30 de Oct. de 2019
Can you explain how you get 10.8838, 10.99206 or 11.12178 as your maxima?
Turlough Hughes
el 30 de Oct. de 2019
Ah, ok I see. min and max are the range of your solution from the mean by one standard deviation!
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Low-Level File I/O en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!