Hvordan laver jeg nemt en midling af rådata i en fil x 30 filer
HejJeg har en mængde rådata - tre målepunkter hvor der er 10 målinger af hver (en måling = en linie) - altså 3 x 10 = 30 liner med rådata.
De tre punkter vil jeg gerne midle - altså en kollone - målinger fra 1-10 skal midles - måling 11-20 skal midles - måling 21 til 30 skal midles - og sådan for alle kolloner.
Output må gerne være en fil med midlinger for hver sæt rådata - se eksempel længere nede.
Jeg har 32 filer i denne omgang, som alle ligger det samme biliotek. Hvis det er meget kompliseret kan jeg sagtens selv klare filerne en af gange.
Håber der er en der kan hjælpe mig.
Mvh
Jens Frederik
Rådata eksempel:
US12345 1 ()
JFF00301
Tekst.....bla bla
"Nr","Step number","Q [m3/h]","p delta [bar]","p sys [bar]","T tank [øC]","T ambient [øC]","T string [øC]","n [rpm]","U [V]","I [A]","P1 [W]","f [Hz]","Power Factor
- ","U1 [V]","U2 [V]","U3 [V]","I1 [A]","I2 [A]","I3 [A]","Time"
2,1,13.51,0.234,1.97,20.2,21.0,20.2,1361,402.2,0.710,288.4,0.00,0.58,402.1,402.9,401.7,0.711,0.708,0.711,38945.554792
3,1,13.51,0.231,1.97,20.2,21.0,20.2,1361,402.0,0.703,276.4,0.00,0.56,401.8,402.7,401.4,0.704,0.701,0.704,38945.554803
4,1,13.72,0.232,1.97,20.2,21.0,20.2,1362,402.1,0.714,297.7,0.00,0.60,401.9,402.8,401.6,0.715,0.712,0.715,38945.554826
5,1,13.83,0.220,1.97,20.2,21.1,20.2,1362,402.3,0.749,332.0,0.00,0.64,402.2,402.8,401.8,0.750,0.747,0.749,38945.554838
6,1,13.67,0.213,1.97,20.2,21.1,20.1,1371,402.0,0.743,328.2,0.00,0.63,401.9,402.5,401.5,0.745,0.742,0.743,38945.554861
7,1,13.67,0.226,1.97,20.2,21.1,20.2,1371,402.4,0.761,345.4,0.00,0.65,402.4,402.9,401.9,0.763,0.759,0.760,38945.554873
8,1,13.37,0.229,1.97,20.2,21.1,20.1,1363,402.2,0.749,334.5,0.00,0.64,402.2,402.7,401.5,0.752,0.747,0.749,38945.554896
9,1,13.60,0.214,1.98,20.2,21.0,20.2,1365,400.5,0.754,338.6,0.00,0.65,400.2,401.1,400.0,0.755,0.752,0.755,38945.554907
10,1,13.47,0.220,1.98,20.2,21.1,20.2,1370,401.8,0.761,343.3,0.00,0.65,401.6,402.5,401.3,0.762,0.759,0.762,38945.554919
11,1,23.51,0.187,1.97,20.2,21.1,20.1,1371,402.2,0.749,334.5,0.00,0.64,402.2,402.7,401.5,0.752,0.747,0.749,38945.555127
12,1,23.45,0.188,1.98,20.2,21.1,20.2,1379,400.5,0.754,338.6,0.00,0.65,400.2,401.1,400.0,0.755,0.752,0.755,38945.555150
13,1,23.25,0.191,1.97,20.2,21.1,20.2,1374,401.8,0.761,343.3,0.00,0.65,401.6,402.5,401.3,0.762,0.759,0.762,38945.555162
14,1,23.35,0.188,1.98,20.2,21.1,20.2,1373,401.9,0.757,341.1,0.00,0.65,401.9,402.6,401.3,0.759,0.756,0.757,38945.555174
15,1,23.35,0.185,1.98,20.2,21.1,20.2,1373,402.1,0.728,309.8,0.00,0.61,402.0,402.8,401.6,0.729,0.726,0.728,38945.555197
16,1,23.35,0.184,1.97,20.2,21.1,20.1,1382,402.1,0.733,316.5,0.00,0.62,402.1,402.7,401.6,0.735,0.731,0.733,38945.555208
17,1,23.25,0.188,1.97,20.2,21.1,20.2,1379,401.7,0.742,324.3,0.00,0.63,401.6,402.3,401.1,0.744,0.740,0.741,38945.555231
18,1,23.28,0.189,1.98,20.2,21.1,20.2,1376,401.8,0.734,318.8,0.00,0.62,401.6,402.6,401.3,0.736,0.732,0.735,38945.555243
19,1,23.28,0.186,1.98,20.2,21.1,20.2,1376,401.8,0.741,325.0,0.00,0.63,401.6,402.4,401.4,0.743,0.738,0.742,38945.555266
20,1,23.33,0.189,1.97,20.2,21.1,20.2,1378,402.2,0.728,311.1,0.00,0.61,402.0,402.9,401.8,0.730,0.725,0.729,38945.555278
21,1,34.99,0.146,1.98,20.2,21.2,20.2,1370,401.8,0.734,318.8,0.00,0.62,401.6,402.6,401.3,0.736,0.732,0.735,38945.555486
22,1,34.69,0.145,1.98,20.2,21.2,20.2,1366,401.8,0.741,325.0,0.00,0.63,401.6,402.4,401.4,0.743,0.738,0.742,38945.555509
23,1,34.69,0.150,1.98,20.2,21.2,20.2,1366,402.2,0.728,311.1,0.00,0.61,402.0,402.9,401.8,0.730,0.725,0.729,38945.555521
24,1,34.69,0.151,1.98,20.2,21.2,20.2,1357,402.4,0.736,318.4,0.00,0.62,402.4,402.9,401.8,0.738,0.734,0.735,38945.555544
25,1,35.05,0.150,1.98,20.2,21.2,20.2,1359,402.0,0.751,335.9,0.00,0.64,401.9,402.5,401.5,0.753,0.748,0.752,38945.555556
26,1,35.09,0.150,1.98,20.2,21.2,20.2,1357,402.5,0.753,338.5,0.00,0.64,402.3,403.1,402.0,0.755,0.751,0.754,38945.555579
27,1,35.09,0.151,1.98,20.2,21.2,20.2,1357,402.4,0.768,354.2,0.00,0.66,402.2,403.1,402.0,0.770,0.765,0.769,38945.555590
28,1,35.13,0.150,1.98,20.2,21.2,20.2,1359,402.0,0.765,351.5,0.00,0.66,401.9,402.7,401.5,0.766,0.762,0.766,38945.555613
29,1,35.22,0.148,1.98,20.2,21.2,20.2,1360,402.0,0.770,351.2,0.00,0.65,401.7,402.7,401.6,0.772,0.767,0.772,38945.555625
30,1,35.08,0.150,1.98,20.2,21.2,20.2,1361,402.1,0.757,342.4,0.00,0.65,402.0,402.7,401.5,0.759,0.755,0.757,38945.555648
Output eksempel:
US90073 1 ()
JFF00301
Tekst.....bla bla
"Nr","Step number","Q [m3/h]","p delta [bar]","p sys [bar]","T tank [øC]","T ambient [øC]","T string [øC]","n [rpm]","U [V]","I [A]","P1 [W]","f [Hz]","Power Factor
- ","U1 [V]","U2 [V]","U3 [V]","I1 [A]","I2 [A]","I3 [A]","Time"
2,1,13.51,0.234,1.97,20.2,21.0,20.2,1361,402.2,0.710,288.4,0.00,0.58,402.1,402.9,401.7,0.711,0.708,0.711,38945.554792
3,1,13.51,0.231,1.97,20.2,21.0,20.2,1361,402.0,0.703,276.4,0.00,0.56,401.8,402.7,401.4,0.704,0.701,0.704,38945.554803