Avatar billede jens_frederik Nybegynder
24. august 2006 - 14:24 Der er 2 kommentarer og
1 løsning

Hvordan laver jeg nemt en midling af rådata i en fil x 30 filer

Hej

Jeg 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"
1,1,13.61,0.220,1.98,20.2,21.0,20.2,1365,401.8,0.708,287.7,0.00,0.58,401.8,402.3,401.3,0.710,0.707,0.708,38945.554769
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"
1,1,13.61,0.220,1.98,20.2,21.0,20.2,1365,401.8,0.708,287.7,0.00,0.58,401.8,402.3,401.3,0.710,0.707,0.708,38945.554769
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
Avatar billede x-lars Novice
24. august 2006 - 15:31 #1
er der nogen forskel mellem input og output? Du kommer nok til at forklare lidt nærmere, hvad det er du gerne vil opnå.
Avatar billede jens_frederik Nybegynder
28. august 2006 - 09:48 #2
Jeg prøver igen.
Det eksempel jeg har vist - er i pricippet det samme - men det er med for at vise forskellen på input og output - den første hvor jeg har de rådata jeg har nu - med 30 målinger - og den sidste hvor jeg har 3 målinger, som så skal være 3 sæt midlinger.

Men jeg forklarer gerne en gang til:
Jeg her et sæt rådata - bestående af "3" punkter på en kurve - hver punkt er målt 10 gange.
Disse 3 x 10 målinger skal så midles, så det bliver til 3 x 1 måling.
Vi vil gerne midle, da vi ikke er helt sikker på stabiliteten i de måliger vi får i prøvestanden.

Altså: et punkt målt ti gange - som skal midles = Én måling.
Det skal så gøre tre gange - en gang for hvert punkt.

Håber det kan bruges.

Mvh

Jens Frederik
Avatar billede jens_frederik Nybegynder
04. september 2006 - 14:39 #3
Spørgsmålet er ikke relevant længere.
Mvh
Jens Frederik
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi har et stort udvalg af Excel kurser. Find lige det kursus der passer dig lige her.

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester