DSPRelated.com
Forums

question on Averages in Excel tabel

Started by aami...@yahoo.co.uk May 30, 2006
Dear Friends,

The Excell Table below shows readings of deflection of a pile(colunms 2, 3 and 4) that were recorded at a fequency of 20HZ. - That means the recording was done 20 times per second (see colunm 1). Colunm 1 begins with a .00 ending ans increases with .05 and so on till .95 before it starts again with .00. that the time interval between the .00s is 1 second.
I wish to find the average deflection for every 20 readings in colunms (2, 3 and 5)(= 1 sec oder from .00 to .00).
in other words: How do i find the average of the first 20 (and each following)readings in the second colunm( 3rd colunm and so on). i wish to establish a new table that will represent the average deflection for each second.
I would be grateful if you could help.
My special gratitudes to Nandan Das, Nick Henry and Mohamed Ali for wonderful ideas and help. I owe you a lot.
Kamara.
time Interval Deflection1 Deflection2 Deflection3
1118950024.00 0.183188 -0.0911854 -0.135182
1118950024.05 0.182272 -0.0949992 -0.144488
1118950024.10 0.180899 -0.0887445 -0.141132
1118950024.15 0.179831 -0.0873715 -0.138538
1118950024.20 0.180288 -0.0847781 -0.137623
1118950024.25 0.180136 -0.0856934 -0.137623
1118950024.30 0.179678 -0.0879817 -0.141284
1118950024.35 0.181356 -0.0823372 -0.129232
1118950024.40 0.182577 -0.0815745 -0.12618
1118950024.45 0.187155 -0.077303 -0.117026
1118950024.50 0.187155 -0.0785234 -0.116111
1118950024.55 0.189444 -0.0802015 -0.110924
1118950024.60 0.190512 -0.0751672 -0.101007
1118950024.65 0.191733 -0.0792862 -0.104974
1118950024.70 0.194632 -0.0742519 -0.0933785
1118950024.75 0.195242 -0.0788285 -0.0904798
1118950024.80 0.197684 -0.0768453 -0.0862079
1118950024.85 0.200583 -0.0782183 -0.0808681
1118950024.90 0.201041 -0.0792862 -0.0781219
1118950024.95 0.20333 -0.0782183 -0.072477
1118950025.00 0.204398 -0.0800489 -0.0706462
1118950025.05 0.208365 -0.0824898 -0.0726295
1118950025.10 0.206534 -0.081727 -0.0679
1118950025.15 0.207144 -0.0820321 -0.064391
1118950025.20 0.207144 -0.0808117 -0.0654589
1118950025.25 0.207144 -0.0821847 -0.0686628
1118950025.30 0.207144 -0.0866087 -0.0720193
1118950025.35 0.204703 -0.0841679 -0.0743078
1118950025.40 0.202414 -0.0847781 -0.0801053
1118950025.45 0.20333 -0.0893547 -0.0895644
1118950025.50 0.198447 -0.0928634 -0.0978029
1118950025.55 0.197684 -0.0859985 -0.0927683
1118950025.60 0.19509 -0.091643 -0.0996337
1118950025.65 0.194784 -0.0910328 -0.106957
1118950025.70 0.191427 -0.0855409 -0.103143
1118950025.75 0.188833 -0.0908802 -0.117331
1118950025.80 0.188681 -0.0884394 -0.118704
1118950025.85 0.187308 -0.0881343 -0.123281
1118950025.90 0.185171 -0.0863036 -0.12679
1118950025.95 0.183035 -0.0843204 -0.13152
1118950026.00 0.179983 -0.0832526 -0.135487
1118950026.05 0.179373 -0.0812694 -0.13625
1118950026.10 0.179373 -0.0881343 -0.144946
1118950026.15 0.180746 -0.0823372 -0.138996
1118950026.20 0.180746 -0.0800489 -0.135639
1118950026.25 0.179373 -0.0777606 -0.134724
1118950026.30 0.180594 -0.0776081 -0.129994
1118950026.35 0.181356 -0.0774555 -0.127858
1118950026.40 0.183188 -0.0734891 -0.122213
1118950026.45 0.184561 -0.0832526 -0.130452
1118950026.50 0.184866 -0.0762351 -0.11901
1118950026.55 0.187765 -0.0791336 -0.117789
1118950026.60 0.18685 -0.081727 -0.116416
1118950026.65 0.190665 -0.0757774 -0.107415
1118950026.70 0.192496 -0.0760825 -0.103906
1118950026.75 0.193411 -0.0769979 -0.0997863
1118950026.80 0.195242 -0.0753198 -0.0900221
1118950026.85 0.196921 -0.0757774 -0.0868182
1118950026.90 0.200583 -0.0783708 -0.0852925
1118950026.95 0.20043 -0.0791336 -0.0819361
1118950027.00 0.201804 -0.0802015 -0.0785796
1118950027.05 0.204703 -0.0798964 -0.074918
1118950027.10 0.203482 -0.0814219 -0.0740026
1118950027.15 0.204703 -0.0785234 -0.0720193
1118950027.20 0.205313 -0.0856934 -0.0779693
1118950027.25 0.206229 -0.0829475 -0.0773591
1118950027.30 0.202719 -0.0832526 -0.080563
1118950027.35 0.201346 -0.0913379 -0.0929208
1118950027.40 0.203177 -0.0834051 -0.0851399
1118950027.45 0.201499 -0.0846255 -0.0862079
1118950027.50 0.199667 -0.0885919 -0.095667
1118950027.55 0.200583 -0.0867613 -0.0947516
1118950027.60 0.197073 -0.0882868 -0.0978029
1118950027.65 0.197684 -0.0824898 -0.0947516
1118950027.70 0.196005 -0.085846 -0.10299
1118950027.75 0.197226 -0.0859985 -0.105126
1118950027.80 0.195395 -0.0859985 -0.109703
1118950027.85 0.192496 -0.0800489 -0.109551
1118950027.90 0.193259 -0.077303 -0.106499
1118950027.95 0.192343 -0.0798964 -0.111992
1118950028.00 0.188833 -0.0792862 -0.111534
1118950028.05 0.190817 -0.078676 -0.111229
1118950028.10 0.188833 -0.0763877 -0.108177
1118950028.15 0.19158 -0.0750147 -0.105126
1118950028.20 0.19097 -0.0762351 -0.10299
1118950028.25 0.192343 -0.0753198 -0.101007
1118950028.30 0.1957 -0.0782183 -0.0984132
1118950028.35 0.195547 -0.0771504 -0.0959721
1118950028.40 0.196463 -0.0769979 -0.0949042
1118950028.45 0.19982 -0.0766928 -0.0917003
1118950028.50 0.198142 -0.0739468 -0.0837669
1118950028.55 0.201499 -0.0742519 -0.0813258
1118950028.60 0.20043 -0.0754723 -0.0775116
1118950028.65 0.203787 -0.0713534 -0.0720193
1118950028.70 0.20455 -0.0748621 -0.0697308
1118950028.75 0.205161 -0.0789811 -0.0718667
1118950028.80 0.206534 -0.0768453 -0.0640858
1118950028.85 0.209128 -0.07593 -0.0607294
1118950028.90 0.208365 -0.0808117 -0.0656115
1118950028.95 0.208823 -0.0855409 -0.066832
1118950029.00 0.208213 -0.081727 -0.0614922
1118950029.05 0.210044 -0.0850832 -0.0701885
1118950029.10 0.206229 -0.0885919 -0.071409
1118950029.15 0.20745 -0.0869138 -0.0723244
1118950029.20 0.205313 -0.0841679 -0.0720193
1118950029.25 0.20394 -0.0855409 -0.0781219
1118950029.30 0.202719 -0.0899649 -0.0826989
1118950029.35 0.200736 -0.094389 -0.0912426
1118950029.40 0.197684 -0.0931685 -0.0958196
1118950029.45 0.198294 -0.0911854 -0.0968875
1118950029.50 0.197379 -0.0881343 -0.0979555
1118950029.55 0.196616 -0.0911854 -0.1036
1118950029.60 0.193106 -0.0922532 -0.107567
1118950029.65 0.192343 -0.0881343 -0.108177
1118950029.70 0.188528 -0.0908802 -0.115043
1118950029.75 0.189139 -0.0887445 -0.118552
1118950029.80 0.187613 -0.0931685 -0.128011
1118950029.85 0.187308 -0.0907277 -0.133046
1118950029.90 0.185782 -0.0852358 -0.12618
1118950029.95 0.184408 -0.0861511 -0.129537
1118950030.00 0.185019 -0.0853883 -0.130299
1118950030.05 0.185019 -0.0846255 -0.129689
1118950030.10 0.184256 -0.0783708 -0.122366
1118950030.15 0.183645 -0.0814219 -0.124807
1118950030.20 0.182882 -0.0853883 -0.127858
1118950030.25 0.185782 -0.0774555 -0.11901
1118950030.30 0.185019 -0.080354 -0.121298
1118950030.35 0.186392 -0.0802015 -0.119925
1118950030.40 0.189291 -0.077303 -0.111839
1118950030.45 0.188833 -0.0795913 -0.114585
1118950030.50 0.190207 -0.0791336 -0.110771
1118950030.55 0.190665 -0.0834051 -0.116721
1118950030.60 0.193106 -0.078676 -0.104974
1118950030.65 0.19158 -0.0785234 -0.102838
1118950030.70 0.19158 -0.0797438 -0.101312
1118950030.75 0.193564 -0.0805066 -0.0962773
1118950030.80 0.194022 -0.0855409 -0.103906
1118950030.85 0.196463 -0.0802015 -0.0944465
1118950030.90 0.194784 -0.0869138 -0.0974978
1118950030.95 0.192648 -0.0846255 -0.100091
1118950031.00 0.194632 -0.0896598 -0.105279
1118950031.05 0.193259 -0.0853883 -0.101312
1118950031.10 0.192953 -0.0893547 -0.104821
1118950031.15 0.19097 -0.0969824 -0.115043
1118950031.20 0.190054 -0.0911854 -0.112297
1118950031.25 0.19097 -0.0901175 -0.110618
1118950031.30 0.190665 -0.0928634 -0.114433
1118950031.35 0.188528 -0.0928634 -0.118704
1118950031.40 0.186239 -0.0968298 -0.123129
1118950031.45 0.187308 -0.088897 -0.118094
1118950031.50 0.185629 -0.095762 -0.126943
1118950031.55 0.188223 -0.0887445 -0.121451
1118950031.60 0.186392 -0.0881343 -0.119315
1118950031.65 0.185629 -0.0855409 -0.122671
1118950031.70 0.184408 -0.0850832 -0.122976
1118950031.75 0.183798 -0.087219 -0.130605
1118950031.80 0.18746 -0.0812694 -0.119772
1118950031.85 0.186392 -0.0808117 -0.121451
1118950031.90 0.18685 -0.0754723 -0.113975
1118950031.95 0.189139 -0.0782183 -0.113822
1118950032.00 0.190817 -0.0716585 -0.103448
1118950032.05 0.19631 -0.0725738 -0.104516
1118950032.10 0.193411 -0.0710483 -0.0935311
1118950032.15 0.198904 -0.0683023 -0.0904798
1118950032.20 0.200583 -0.0625053 -0.0776642
1118950032.25 0.203482 -0.0676921 -0.0836143
1118950032.30 0.205008 -0.0638783 -0.071409
1118950032.35 0.206229 -0.066014 -0.0662218
1118950032.40 0.209586 -0.0622002 -0.0599666
1118950032.45 0.211264 -0.0623527 -0.0540165
1118950032.50 0.212943 -0.0622002 -0.05066
1118950032.55 0.214927 -0.0611323 -0.0434894
1118950032.60 0.214621 -0.0649461 -0.0434894
1118950032.65 0.219046 -0.0577761 -0.0334201
1118950032.70 0.218284 -0.0684549 -0.0427266
1118950032.75 0.219352 -0.066014 -0.0378445
1118950032.80 0.218131 -0.0664717 -0.0364714
1118950032.85 0.217673 -0.066014 -0.0360137
1118950032.90 0.218131 -0.07593 -0.0486767
1118950032.95 0.214927 -0.0730315 -0.0454728
1118950033.00 0.214011 -0.0800489 -0.0570678
1118950033.05 0.211722 -0.0794387 -0.0582883
1118950033.10 0.209738 -0.0797438 -0.0601191
1118950033.15 0.207144 -0.081727 -0.0683577
1118950033.20 0.20394 -0.0879817 -0.0781219
1118950033.25 0.202414 -0.0870664 -0.0831566
1118950033.30 0.198904 -0.0847781 -0.0836143
1118950033.35 0.198142 -0.0898124 -0.0961247
1118950033.40 0.1957 -0.0913379 -0.107567
1118950033.45 0.192038 -0.0931685 -0.114585
1118950033.50 0.188528 -0.0925583 -0.119925
1118950033.55 0.185019 -0.0972875 -0.13091
1118950033.60 0.184256 -0.0933211 -0.134266
1118950033.65 0.181814 -0.0919481 -0.135944
1118950033.70 0.180594 -0.0881343 -0.133961
1118950033.75 0.180746 -0.0914905 -0.139301
1118950033.80 0.177694 -0.0936262 -0.145404
1118950033.85 0.180441 -0.0834051 -0.137775
1118950033.90 0.177999 -0.091643 -0.145098
1118950033.95 0.181051 -0.087219 -0.140064
1118950034.00 0.180136 -0.0861511 -0.133351
1118950034.05 0.181509 -0.0818796 -0.129994
1118950034.10 0.183188 -0.0852358 -0.132893
1118950034.15 0.182425 -0.0824898 -0.12618
1118950034.20 0.186239 -0.0805066 -0.122976
1118950034.25 0.185324 -0.0815745 -0.121298
1118950034.30 0.190359 -0.0751672 -0.106499
1118950034.35 0.19219 -0.078676 -0.105584
1118950034.40 0.191275 -0.0783708 -0.101159
1118950034.45 0.19631 -0.0728789 -0.0868182
1118950034.50 0.195242 -0.0795913 -0.0877336
1118950034.55 0.200736 -0.0783708 -0.0849874
1118950034.60 0.19921 -0.0811168 -0.080563
1118950034.65 0.202567 -0.0795913 -0.0799527
1118950034.70 0.202567 -0.0800489 -0.0729347
1118950034.75 0.203177 -0.0873715 -0.0814784
1118950034.80 0.203024 -0.0821847 -0.0761385
1118950034.85 0.201499 -0.084473 -0.0767488
1118950034.90 0.202261 -0.0892022 -0.0836143
1118950034.95 0.199362 -0.0913379 -0.0874284
1118950035.00 0.198599 -0.0948466 -0.0923106
1118950035.05 0.19921 -0.0919481 -0.09109
1118950035.10 0.197379 -0.0960671 -0.0964298
1118950035.15 0.195853 -0.0989656 -0.0996337
1118950035.20 0.193259 -0.098813 -0.108177
1118950035.25 0.193564 -0.101406 -0.116569
1118950035.30 0.190817 -0.0959145 -0.111534
1118950035.35 0.18685 -0.101712 -0.12679
1118950035.40 0.185782 -0.0948466 -0.123281
1118950035.45 0.184103 -0.0983554 -0.132588
1118950035.50 0.182577 -0.100339 -0.139606
1118950035.55 0.181509 -0.0962196 -0.13686
1118950035.60 0.177237 -0.102017 -0.148455



Try using the filter command. Have your filter taps as num 1/20*ones(20,1). So do something like filter(num,1,your_data).

That will give you a moving average of the 20readings. You will need to
account for the latency in the filter to line things up properly.

hope this is clear.

Nandan

On 5/30/06, a...@yahoo.co.uk wrote:
>
> Dear Friends,
>
> The Excell Table below shows readings of deflection of a pile(colunms 2, 3
> and 4) that were recorded at a fequency of 20HZ. - That means the recording
> was done 20 times per second (see colunm 1). Colunm 1 begins with a .00
> ending ans increases with .05 and so on till .95 before it starts again with
> .00. that the time interval between the .00s is 1 second.
> I wish to find the average deflection for every 20 readings in colunms (2,
> 3 and 5)(= 1 sec oder from .00 to .00).
> in other words: How do i find the average of the first 20 (and each
> following)readings in the second colunm( 3rd colunm and so on). i wish to
> establish a new table that will represent the average deflection for each
> second.
> I would be grateful if you could help.
> My special gratitudes to Nandan Das, Nick Henry and Mohamed Ali for
> wonderful ideas and help. I owe you a lot.
> Kamara.
> time Interval Deflection1 Deflection2 Deflection3
> 1118950024.00 0.183188 -0.0911854 -0.135182
> 1118950024.05 0.182272 -0.0949992 -0.144488
> 1118950024.10 0.180899 -0.0887445 -0.141132
> 1118950024.15 0.179831 -0.0873715 -0.138538
> 1118950024.20 0.180288 -0.0847781 -0.137623
> 1118950024.25 0.180136 -0.0856934 -0.137623
> 1118950024.30 0.179678 -0.0879817 -0.141284
> 1118950024.35 0.181356 -0.0823372 -0.129232
> 1118950024.40 0.182577 -0.0815745 -0.12618
> 1118950024.45 0.187155 -0.077303 -0.117026
> 1118950024.50 0.187155 -0.0785234 -0.116111
> 1118950024.55 0.189444 -0.0802015 -0.110924
> 1118950024.60 0.190512 -0.0751672 -0.101007
> 1118950024.65 0.191733 -0.0792862 -0.104974
> 1118950024.70 0.194632 -0.0742519 -0.0933785
> 1118950024.75 0.195242 -0.0788285 -0.0904798
> 1118950024.80 0.197684 -0.0768453 -0.0862079
> 1118950024.85 0.200583 -0.0782183 -0.0808681
> 1118950024.90 0.201041 -0.0792862 -0.0781219
> 1118950024.95 0.20333 -0.0782183 -0.072477
> 1118950025.00 0.204398 -0.0800489 -0.0706462
> 1118950025.05 0.208365 -0.0824898 -0.0726295
> 1118950025.10 0.206534 -0.081727 -0.0679
> 1118950025.15 0.207144 -0.0820321 -0.064391
> 1118950025.20 0.207144 -0.0808117 -0.0654589
> 1118950025.25 0.207144 -0.0821847 -0.0686628
> 1118950025.30 0.207144 -0.0866087 -0.0720193
> 1118950025.35 0.204703 -0.0841679 -0.0743078
> 1118950025.40 0.202414 -0.0847781 -0.0801053
> 1118950025.45 0.20333 -0.0893547 -0.0895644
> 1118950025.50 0.198447 -0.0928634 -0.0978029
> 1118950025.55 0.197684 -0.0859985 -0.0927683
> 1118950025.60 0.19509 -0.091643 -0.0996337
> 1118950025.65 0.194784 -0.0910328 -0.106957
> 1118950025.70 0.191427 -0.0855409 -0.103143
> 1118950025.75 0.188833 -0.0908802 -0.117331
> 1118950025.80 0.188681 -0.0884394 -0.118704
> 1118950025.85 0.187308 -0.0881343 -0.123281
> 1118950025.90 0.185171 -0.0863036 -0.12679
> 1118950025.95 0.183035 -0.0843204 -0.13152
> 1118950026.00 0.179983 -0.0832526 -0.135487
> 1118950026.05 0.179373 -0.0812694 -0.13625
> 1118950026.10 0.179373 -0.0881343 -0.144946
> 1118950026.15 0.180746 -0.0823372 -0.138996
> 1118950026.20 0.180746 -0.0800489 -0.135639
> 1118950026.25 0.179373 -0.0777606 -0.134724
> 1118950026.30 0.180594 -0.0776081 -0.129994
> 1118950026.35 0.181356 -0.0774555 -0.127858
> 1118950026.40 0.183188 -0.0734891 -0.122213
> 1118950026.45 0.184561 -0.0832526 -0.130452
> 1118950026.50 0.184866 -0.0762351 -0.11901
> 1118950026.55 0.187765 -0.0791336 -0.117789
> 1118950026.60 0.18685 -0.081727 -0.116416
> 1118950026.65 0.190665 -0.0757774 -0.107415
> 1118950026.70 0.192496 -0.0760825 -0.103906
> 1118950026.75 0.193411 -0.0769979 -0.0997863
> 1118950026.80 0.195242 -0.0753198 -0.0900221
> 1118950026.85 0.196921 -0.0757774 -0.0868182
> 1118950026.90 0.200583 -0.0783708 -0.0852925
> 1118950026.95 0.20043 -0.0791336 -0.0819361
> 1118950027.00 0.201804 -0.0802015 -0.0785796
> 1118950027.05 0.204703 -0.0798964 -0.074918
> 1118950027.10 0.203482 -0.0814219 -0.0740026
> 1118950027.15 0.204703 -0.0785234 -0.0720193
> 1118950027.20 0.205313 -0.0856934 -0.0779693
> 1118950027.25 0.206229 -0.0829475 -0.0773591
> 1118950027.30 0.202719 -0.0832526 -0.080563
> 1118950027.35 0.201346 -0.0913379 -0.0929208
> 1118950027.40 0.203177 -0.0834051 -0.0851399
> 1118950027.45 0.201499 -0.0846255 -0.0862079
> 1118950027.50 0.199667 -0.0885919 -0.095667
> 1118950027.55 0.200583 -0.0867613 -0.0947516
> 1118950027.60 0.197073 -0.0882868 -0.0978029
> 1118950027.65 0.197684 -0.0824898 -0.0947516
> 1118950027.70 0.196005 -0.085846 -0.10299
> 1118950027.75 0.197226 -0.0859985 -0.105126
> 1118950027.80 0.195395 -0.0859985 -0.109703
> 1118950027.85 0.192496 -0.0800489 -0.109551
> 1118950027.90 0.193259 -0.077303 -0.106499
> 1118950027.95 0.192343 -0.0798964 -0.111992
> 1118950028.00 0.188833 -0.0792862 -0.111534
> 1118950028.05 0.190817 -0.078676 -0.111229
> 1118950028.10 0.188833 -0.0763877 -0.108177
> 1118950028.15 0.19158 -0.0750147 -0.105126
> 1118950028.20 0.19097 -0.0762351 -0.10299
> 1118950028.25 0.192343 -0.0753198 -0.101007
> 1118950028.30 0.1957 -0.0782183 -0.0984132
> 1118950028.35 0.195547 -0.0771504 -0.0959721
> 1118950028.40 0.196463 -0.0769979 -0.0949042
> 1118950028.45 0.19982 -0.0766928 -0.0917003
> 1118950028.50 0.198142 -0.0739468 -0.0837669
> 1118950028.55 0.201499 -0.0742519 -0.0813258
> 1118950028.60 0.20043 -0.0754723 -0.0775116
> 1118950028.65 0.203787 -0.0713534 -0.0720193
> 1118950028.70 0.20455 -0.0748621 -0.0697308
> 1118950028.75 0.205161 -0.0789811 -0.0718667
> 1118950028.80 0.206534 -0.0768453 -0.0640858
> 1118950028.85 0.209128 -0.07593 -0.0607294
> 1118950028.90 0.208365 -0.0808117 -0.0656115
> 1118950028.95 0.208823 -0.0855409 -0.066832
> 1118950029.00 0.208213 -0.081727 -0.0614922
> 1118950029.05 0.210044 -0.0850832 -0.0701885
> 1118950029.10 0.206229 -0.0885919 -0.071409
> 1118950029.15 0.20745 -0.0869138 -0.0723244
> 1118950029.20 0.205313 -0.0841679 -0.0720193
> 1118950029.25 0.20394 -0.0855409 -0.0781219
> 1118950029.30 0.202719 -0.0899649 -0.0826989
> 1118950029.35 0.200736 -0.094389 -0.0912426
> 1118950029.40 0.197684 -0.0931685 -0.0958196
> 1118950029.45 0.198294 -0.0911854 -0.0968875
> 1118950029.50 0.197379 -0.0881343 -0.0979555
> 1118950029.55 0.196616 -0.0911854 -0.1036
> 1118950029.60 0.193106 -0.0922532 -0.107567
> 1118950029.65 0.192343 -0.0881343 -0.108177
> 1118950029.70 0.188528 -0.0908802 -0.115043
> 1118950029.75 0.189139 -0.0887445 -0.118552
> 1118950029.80 0.187613 -0.0931685 -0.128011
> 1118950029.85 0.187308 -0.0907277 -0.133046
> 1118950029.90 0.185782 -0.0852358 -0.12618
> 1118950029.95 0.184408 -0.0861511 -0.129537
> 1118950030.00 0.185019 -0.0853883 -0.130299
> 1118950030.05 0.185019 -0.0846255 -0.129689
> 1118950030.10 0.184256 -0.0783708 -0.122366
> 1118950030.15 0.183645 -0.0814219 -0.124807
> 1118950030.20 0.182882 -0.0853883 -0.127858
> 1118950030.25 0.185782 -0.0774555 -0.11901
> 1118950030.30 0.185019 -0.080354 -0.121298
> 1118950030.35 0.186392 -0.0802015 -0.119925
> 1118950030.40 0.189291 -0.077303 -0.111839
> 1118950030.45 0.188833 -0.0795913 -0.114585
> 1118950030.50 0.190207 -0.0791336 -0.110771
> 1118950030.55 0.190665 -0.0834051 -0.116721
> 1118950030.60 0.193106 -0.078676 -0.104974
> 1118950030.65 0.19158 -0.0785234 -0.102838
> 1118950030.70 0.19158 -0.0797438 -0.101312
> 1118950030.75 0.193564 -0.0805066 -0.0962773
> 1118950030.80 0.194022 -0.0855409 -0.103906
> 1118950030.85 0.196463 -0.0802015 -0.0944465
> 1118950030.90 0.194784 -0.0869138 -0.0974978
> 1118950030.95 0.192648 -0.0846255 -0.100091
> 1118950031.00 0.194632 -0.0896598 -0.105279
> 1118950031.05 0.193259 -0.0853883 -0.101312
> 1118950031.10 0.192953 -0.0893547 -0.104821
> 1118950031.15 0.19097 -0.0969824 -0.115043
> 1118950031.20 0.190054 -0.0911854 -0.112297
> 1118950031.25 0.19097 -0.0901175 -0.110618
> 1118950031.30 0.190665 -0.0928634 -0.114433
> 1118950031.35 0.188528 -0.0928634 -0.118704
> 1118950031.40 0.186239 -0.0968298 -0.123129
> 1118950031.45 0.187308 -0.088897 -0.118094
> 1118950031.50 0.185629 -0.095762 -0.126943
> 1118950031.55 0.188223 -0.0887445 -0.121451
> 1118950031.60 0.186392 -0.0881343 -0.119315
> 1118950031.65 0.185629 -0.0855409 -0.122671
> 1118950031.70 0.184408 -0.0850832 -0.122976
> 1118950031.75 0.183798 -0.087219 -0.130605
> 1118950031.80 0.18746 -0.0812694 -0.119772
> 1118950031.85 0.186392 -0.0808117 -0.121451
> 1118950031.90 0.18685 -0.0754723 -0.113975
> 1118950031.95 0.189139 -0.0782183 -0.113822
> 1118950032.00 0.190817 -0.0716585 -0.103448
> 1118950032.05 0.19631 -0.0725738 -0.104516
> 1118950032.10 0.193411 -0.0710483 -0.0935311
> 1118950032.15 0.198904 -0.0683023 -0.0904798
> 1118950032.20 0.200583 -0.0625053 -0.0776642
> 1118950032.25 0.203482 -0.0676921 -0.0836143
> 1118950032.30 0.205008 -0.0638783 -0.071409
> 1118950032.35 0.206229 -0.066014 -0.0662218
> 1118950032.40 0.209586 -0.0622002 -0.0599666
> 1118950032.45 0.211264 -0.0623527 -0.0540165
> 1118950032.50 0.212943 -0.0622002 -0.05066
> 1118950032.55 0.214927 -0.0611323 -0.0434894
> 1118950032.60 0.214621 -0.0649461 -0.0434894
> 1118950032.65 0.219046 -0.0577761 -0.0334201
> 1118950032.70 0.218284 -0.0684549 -0.0427266
> 1118950032.75 0.219352 -0.066014 -0.0378445
> 1118950032.80 0.218131 -0.0664717 -0.0364714
> 1118950032.85 0.217673 -0.066014 -0.0360137
> 1118950032.90 0.218131 -0.07593 -0.0486767
> 1118950032.95 0.214927 -0.0730315 -0.0454728
> 1118950033.00 0.214011 -0.0800489 -0.0570678
> 1118950033.05 0.211722 -0.0794387 -0.0582883
> 1118950033.10 0.209738 -0.0797438 -0.0601191
> 1118950033.15 0.207144 -0.081727 -0.0683577
> 1118950033.20 0.20394 -0.0879817 -0.0781219
> 1118950033.25 0.202414 -0.0870664 -0.0831566
> 1118950033.30 0.198904 -0.0847781 -0.0836143
> 1118950033.35 0.198142 -0.0898124 -0.0961247
> 1118950033.40 0.1957 -0.0913379 -0.107567
> 1118950033.45 0.192038 -0.0931685 -0.114585
> 1118950033.50 0.188528 -0.0925583 -0.119925
> 1118950033.55 0.185019 -0.0972875 -0.13091
> 1118950033.60 0.184256 -0.0933211 -0.134266
> 1118950033.65 0.181814 -0.0919481 -0.135944
> 1118950033.70 0.180594 -0.0881343 -0.133961
> 1118950033.75 0.180746 -0.0914905 -0.139301
> 1118950033.80 0.177694 -0.0936262 -0.145404
> 1118950033.85 0.180441 -0.0834051 -0.137775
> 1118950033.90 0.177999 -0.091643 -0.145098
> 1118950033.95 0.181051 -0.087219 -0.140064
> 1118950034.00 0.180136 -0.0861511 -0.133351
> 1118950034.05 0.181509 -0.0818796 -0.129994
> 1118950034.10 0.183188 -0.0852358 -0.132893
> 1118950034.15 0.182425 -0.0824898 -0.12618
> 1118950034.20 0.186239 -0.0805066 -0.122976
> 1118950034.25 0.185324 -0.0815745 -0.121298
> 1118950034.30 0.190359 -0.0751672 -0.106499
> 1118950034.35 0.19219 -0.078676 -0.105584
> 1118950034.40 0.191275 -0.0783708 -0.101159
> 1118950034.45 0.19631 -0.0728789 -0.0868182
> 1118950034.50 0.195242 -0.0795913 -0.0877336
> 1118950034.55 0.200736 -0.0783708 -0.0849874
> 1118950034.60 0.19921 -0.0811168 -0.080563
> 1118950034.65 0.202567 -0.0795913 -0.0799527
> 1118950034.70 0.202567 -0.0800489 -0.0729347
> 1118950034.75 0.203177 -0.0873715 -0.0814784
> 1118950034.80 0.203024 -0.0821847 -0.0761385
> 1118950034.85 0.201499 -0.084473 -0.0767488
> 1118950034.90 0.202261 -0.0892022 -0.0836143
> 1118950034.95 0.199362 -0.0913379 -0.0874284
> 1118950035.00 0.198599 -0.0948466 -0.0923106
> 1118950035.05 0.19921 -0.0919481 -0.09109
> 1118950035.10 0.197379 -0.0960671 -0.0964298
> 1118950035.15 0.195853 -0.0989656 -0.0996337
> 1118950035.20 0.193259 -0.098813 -0.108177
> 1118950035.25 0.193564 -0.101406 -0.116569
> 1118950035.30 0.190817 -0.0959145 -0.111534
> 1118950035.35 0.18685 -0.101712 -0.12679
> 1118950035.40 0.185782 -0.0948466 -0.123281
> 1118950035.45 0.184103 -0.0983554 -0.132588
> 1118950035.50 0.182577 -0.100339 -0.139606
> 1118950035.55 0.181509 -0.0962196 -0.13686
> 1118950035.60 0.177237 -0.102017 -0.148455
My previous email will find the moving average..so first valid (ignoring
initial transient) output = average of samples 1 to 20, second output is
average of samples 2 to 21 and so on. However, if you want to do averaging
of samples 1 to 20 and then of samples 21 to 40 and so on, all you should do
is to probably to first reshape your data such that each row has 20 samples
(So use "reshape" command). And then find the average of each row (use
"mean" command).

Nandan

On 5/30/06, Nandan Das wrote:
>
> Try using the filter command. Have your filter taps as num > 1/20*ones(20,1). So do something like filter(num,1,your_data).
>
> That will give you a moving average of the 20readings. You will need to
> account for the latency in the filter to line things up properly.
>
> hope this is clear.
>
> Nandan
> On 5/30/06, a...@yahoo.co.uk < a...@yahoo.co.uk> wrote:
> >
> > Dear Friends,
> >
> > The Excell Table below shows readings of deflection of a pile(colunms 2,
> > 3 and 4) that were recorded at a fequency of 20HZ. - That means the
> > recording was done 20 times per second (see colunm 1). Colunm 1 begins with
> > a .00 ending ans increases with .05 and so on till .95 before it starts
> > again with .00. that the time interval between the .00s is 1 second.
> > I wish to find the average deflection for every 20 readings in colunms
> > (2, 3 and 5)(= 1 sec oder from .00 to .00).
> > in other words: How do i find the average of the first 20 (and each
> > following)readings in the second colunm( 3rd colunm and so on). i wish to
> > establish a new table that will represent the average deflection for each
> > second.
> > I would be grateful if you could help.
> > My special gratitudes to Nandan Das, Nick Henry and Mohamed Ali for
> > wonderful ideas and help. I owe you a lot.
> > Kamara.
> >
> >
> > time Interval Deflection1 Deflection2 Deflection3
> > 1118950024.00 0.183188 -0.0911854 -0.135182
> > 1118950024.05 0.182272 -0.0949992 -0.144488
> > 1118950024.10 0.180899 -0.0887445 -0.141132
> > 1118950024.15 0.179831 -0.0873715 -0.138538
> > 1118950024.20 0.180288 -0.0847781 -0.137623
> > 1118950024.25 0.180136 -0.0856934 -0.137623
> > 1118950024.30 0.179678 -0.0879817 -0.141284
> > 1118950024.35 0.181356 -0.0823372 -0.129232
> > 1118950024.40 0.182577 -0.0815745 -0.12618
> > 1118950024.45 0.187155 -0.077303 -0.117026
> > 1118950024.50 0.187155 -0.0785234 -0.116111
> > 1118950024.55 0.189444 -0.0802015 -0.110924
> > 1118950024.60 0.190512 -0.0751672 -0.101007
> > 1118950024.65 0.191733 -0.0792862 -0.104974
> > 1118950024.70 0.194632 -0.0742519 -0.0933785
> > 1118950024.75 0.195242 -0.0788285 -0.0904798
> > 1118950024.80 0.197684 -0.0768453 -0.0862079
> > 1118950024.85 0.200583 -0.0782183 -0.0808681
> > 1118950024.90 0.201041 - 0.0792862 -0.0781219
> > 1118950024.95 0.20333 -0.0782183 -0.072477
> > 1118950025.00 0.204398 -0.0800489 -0.0706462
> > 1118950025.05 0.208365 -0.0824898 -0.0726295
> > 1118950025.10 0.206534 -0.081727 -0.0679
> > 1118950025.15 0.207144 -0.0820321 -0.064391
> > 1118950025.20 0.207144 -0.0808117 -0.0654589
> > 1118950025.25 0.207144 -0.0821847 -0.0686628
> > 1118950025.30 0.207144 -0.0866087 -0.0720193
> > 1118950025.35 0.204703 -0.0841679 -0.0743078
> > 1118950025.40 0.202414 -0.0847781 -0.0801053
> > 1118950025.45 0.20333 - 0.0893547 -0.0895644
> > 1118950025.50 0.198447 -0.0928634 -0.0978029
> > 1118950025.55 0.197684 -0.0859985 -0.0927683
> > 1118950025.60 0.19509 -0.091643 -0.0996337
> > 1118950025.65 0.194784 -0.0910328 -0.106957
> > 1118950025.70 0.191427 -0.0855409 -0.103143
> > 1118950025.75 0.188833 -0.0908802 -0.117331
> > 1118950025.80 0.188681 -0.0884394 -0.118704
> > 1118950025.85 0.187308 -0.0881343 -0.123281
> > 1118950025.90 0.185171 -0.0863036 -0.12679
> > 1118950025.95 0.183035 -0.0843204 -0.13152
> > 1118950026.00 0.179983 -0.0832526 -0.135487
> > 1118950026.05 0.179373 -0.0812694 -0.13625
> > 1118950026.10 0.179373 -0.0881343 -0.144946
> > 1118950026.15 0.180746 -0.0823372 -0.138996
> > 1118950026.20 0.180746 -0.0800489 -0.135639
> > 1118950026.25 0.179373 -0.0777606 -0.134724
> > 1118950026.30 0.180594 -0.0776081 -0.129994
> > 1118950026.35 0.181356 -0.0774555 -0.127858
> > 1118950026.40 0.183188 -0.0734891 -0.122213
> > 1118950026.45 0.184561 -0.0832526 -0.130452
> > 1118950026.50 0.184866 -0.0762351 -0.11901
> > 1118950026.55 0.187765 -0.0791336 -0.117789
> > 1118950026.60 0.18685 -0.081727 -0.116416
> > 1118950026.65 0.190665 -0.0757774 -0.107415
> > 1118950026.70 0.192496 -0.0760825 -0.103906
> > 1118950026.75 0.193411 -0.0769979 -0.0997863
> > 1118950026.80 0.195242 -0.0753198 -0.0900221
> > 1118950026.85 0.196921 -0.0757774 -0.0868182
> > 1118950026.90 0.200583 -0.0783708 -0.0852925
> > 1118950026.95 0.20043 -0.0791336 -0.0819361
> > 1118950027.00 0.201804 -0.0802015 -0.0785796
> > 1118950027.05 0.204703 -0.0798964 -0.074918
> > 1118950027.10 0.203482 -0.0814219 -0.0740026
> > 1118950027.15 0.204703 -0.0785234 -0.0720193
> > 1118950027.20 0.205313 -0.0856934 -0.0779693
> > 1118950027.25 0.206229 -0.0829475 -0.0773591
> > 1118950027.30 0.202719 - 0.0832526 -0.080563
> > 1118950027.35 0.201346 -0.0913379 -0.0929208
> > 1118950027.40 0.203177 -0.0834051 -0.0851399
> > 1118950027.45 0.201499 -0.0846255 -0.0862079
> > 1118950027.50 0.199667 -0.0885919 -0.095667
> > 1118950027.55 0.200583 -0.0867613 -0.0947516
> > 1118950027.60 0.197073 -0.0882868 -0.0978029
> > 1118950027.65 0.197684 -0.0824898 - 0.0947516
> > 1118950027.70 0.196005 -0.085846 -0.10299
> > 1118950027.75 0.197226 -0.0859985 -0.105126
> > 1118950027.80 0.195395 -0.0859985 -0.109703
> > 1118950027.85 0.192496 - 0.0800489 -0.109551
> > 1118950027.90 0.193259 -0.077303 -0.106499
> > 1118950027.95 0.192343 -0.0798964 -0.111992
> > 1118950028.00 0.188833 -0.0792862 -0.111534
> > 1118950028.05 0.190817 -0.078676 -0.111229
> > 1118950028.10 0.188833 -0.0763877 -0.108177
> > 1118950028.15 0.19158 -0.0750147 -0.105126
> > 1118950028.20 0.19097 -0.0762351 -0.10299
> > 1118950028.25 0.192343 -0.0753198 -0.101007
> > 1118950028.30 0.1957 -0.0782183 -0.0984132
> > 1118950028.35 0.195547 -0.0771504 -0.0959721
> > 1118950028.40 0.196463 -0.0769979 -0.0949042
> > 1118950028.45 0.19982 -0.0766928 -0.0917003
> > 1118950028.50 0.198142 -0.0739468 -0.0837669
> > 1118950028.55 0.201499 -0.0742519 -0.0813258
> > 1118950028.60 0.20043 -0.0754723 -0.0775116
> > 1118950028.65 0.203787 -0.0713534 -0.0720193
> > 1118950028.70 0.20455 -0.0748621 -0.0697308
> > 1118950028.75 0.205161 -0.0789811 -0.0718667
> > 1118950028.80 0.206534 -0.0768453 -0.0640858
> > 1118950028.85 0.209128 -0.07593 -0.0607294
> > 1118950028.90 0.208365 -0.0808117 -0.0656115
> > 1118950028.95 0.208823 - 0.0855409 -0.066832
> > 1118950029.00 0.208213 -0.081727 -0.0614922
> > 1118950029.05 0.210044 -0.0850832 -0.0701885
> > 1118950029.10 0.206229 -0.0885919 -0.071409
> > 1118950029.15 0.20745 -0.0869138 -0.0723244
> > 1118950029.20 0.205313 -0.0841679 -0.0720193
> > 1118950029.25 0.20394 -0.0855409 -0.0781219
> > 1118950029.30 0.202719 -0.0899649 - 0.0826989
> > 1118950029.35 0.200736 -0.094389 -0.0912426
> > 1118950029.40 0.197684 -0.0931685 -0.0958196
> > 1118950029.45 0.198294 -0.0911854 -0.0968875
> > 1118950029.50 0.197379 -0.0881343 -0.0979555
> > 1118950029.55 0.196616 -0.0911854 -0.1036
> > 1118950029.60 0.193106 -0.0922532 -0.107567
> > 1118950029.65 0.192343 -0.0881343 -0.108177
> > 1118950029.70 0.188528 -0.0908802 -0.115043
> > 1118950029.75 0.189139 -0.0887445 -0.118552
> > 1118950029.80 0.187613 -0.0931685 -0.128011
> > 1118950029.85 0.187308 -0.0907277 -0.133046
> > 1118950029.90 0.185782 -0.0852358 -0.12618
> > 1118950029.95 0.184408 -0.0861511 -0.129537
> > 1118950030.00 0.185019 -0.0853883 -0.130299
> > 1118950030.05 0.185019 -0.0846255 -0.129689
> > 1118950030.10 0.184256 -0.0783708 -0.122366
> > 1118950030.15 0.183645 -0.0814219 -0.124807
> > 1118950030.20 0.182882 -0.0853883 -0.127858
> > 1118950030.25 0.185782 -0.0774555 -0.11901
> > 1118950030.30 0.185019 -0.080354 -0.121298
> > 1118950030.35 0.186392 -0.0802015 -0.119925
> > 1118950030.40 0.189291 -0.077303 -0.111839
> > 1118950030.45 0.188833 -0.0795913 -0.114585
> > 1118950030.50 0.190207 -0.0791336 -0.110771
> > 1118950030.55 0.190665 -0.0834051 -0.116721
> > 1118950030.60 0.193106 -0.078676 -0.104974
> > 1118950030.65 0.19158 -0.0785234 -0.102838
> > 1118950030.70 0.19158 -0.0797438 -0.101312
> > 1118950030.75 0.193564 -0.0805066 -0.0962773
> > 1118950030.80 0.194022 - 0.0855409 -0.103906
> > 1118950030.85 0.196463 -0.0802015 -0.0944465
> > 1118950030.90 0.194784 -0.0869138 -0.0974978
> > 1118950030.95 0.192648 -0.0846255 -0.100091
> > 1118950031.00 0.194632 -0.0896598 -0.105279
> > 1118950031.05 0.193259 -0.0853883 -0.101312
> > 1118950031.10 0.192953 -0.0893547 -0.104821
> > 1118950031.15 0.19097 -0.0969824 -0.115043
> > 1118950031.20 0.190054 -0.0911854 -0.112297
> > 1118950031.25 0.19097 -0.0901175 -0.110618
> > 1118950031.30 0.190665 -0.0928634 -0.114433
> > 1118950031.35 0.188528 -0.0928634 -0.118704
> > 1118950031.40 0.186239 -0.0968298 -0.123129
> > 1118950031.45 0.187308 -0.088897 -0.118094
> > 1118950031.50 0.185629 -0.095762 -0.126943
> > 1118950031.55 0.188223 -0.0887445 -0.121451
> > 1118950031.60 0.186392 -0.0881343 -0.119315
> > 1118950031.65 0.185629 -0.0855409 -0.122671
> > 1118950031.70 0.184408 -0.0850832 -0.122976
> > 1118950031.75 0.183798 -0.087219 -0.130605
> > 1118950031.80 0.18746 -0.0812694 -0.119772
> > 1118950031.85 0.186392 -0.0808117 -0.121451
> > 1118950031.90 0.18685 -0.0754723 -0.113975
> > 1118950031.95 0.189139 -0.0782183 -0.113822
> > 1118950032.00 0.190817 -0.0716585 -0.103448
> > 1118950032.05 0.19631 -0.0725738 -0.104516
> > 1118950032.10 0.193411 -0.0710483 -0.0935311
> > 1118950032.15 0.198904 -0.0683023 -0.0904798
> > 1118950032.20 0.200583 -0.0625053 -0.0776642
> > 1118950032.25 0.203482 -0.0676921 -0.0836143
> > 1118950032.30 0.205008 -0.0638783 -0.071409
> > 1118950032.35 0.206229 -0.066014 -0.0662218
> > 1118950032.40 0.209586 -0.0622002 -0.0599666
> > 1118950032.45 0.211264 -0.0623527 -0.0540165
> > 1118950032.50 0.212943 -0.0622002 -0.05066
> > 1118950032.55 0.214927 -0.0611323 -0.0434894
> > 1118950032.60 0.214621 -0.0649461 -0.0434894
> > 1118950032.65 0.219046 - 0.0577761 -0.0334201
> > 1118950032.70 0.218284 -0.0684549 -0.0427266
> > 1118950032.75 0.219352 -0.066014 -0.0378445
> > 1118950032.80 0.218131 -0.0664717 -0.0364714
> > 1118950032.85 0.217673 -0.066014 -0.0360137
> > 1118950032.90 0.218131 -0.07593 -0.0486767
> > 1118950032.95 0.214927 -0.0730315 -0.0454728
> > 1118950033.00 0.214011 -0.0800489 - 0.0570678
> > 1118950033.05 0.211722 -0.0794387 -0.0582883
> > 1118950033.10 0.209738 -0.0797438 -0.0601191
> > 1118950033.15 0.207144 -0.081727 -0.0683577
> > 1118950033.20 0.20394 -0.0879817 -0.0781219
> > 1118950033.25 0.202414 -0.0870664 -0.0831566
> > 1118950033.30 0.198904 -0.0847781 -0.0836143
> > 1118950033.35 0.198142 -0.0898124 -0.0961247
> > 1118950033.40 0.1957 -0.0913379 -0.107567
> > 1118950033.45 0.192038 -0.0931685 -0.114585
> > 1118950033.50 0.188528 -0.0925583 -0.119925
> > 1118950033.55 0.185019 -0.0972875 -0.13091
> > 1118950033.60 0.184256 -0.0933211 -0.134266
> > 1118950033.65 0.181814 -0.0919481 -0.135944
> > 1118950033.70 0.180594 -0.0881343 -0.133961
> > 1118950033.75 0.180746 -0.0914905 -0.139301
> > 1118950033.80 0.177694 -0.0936262 -0.145404
> > 1118950033.85 0.180441 -0.0834051 -0.137775
> > 1118950033.90 0.177999 -0.091643 -0.145098
> > 1118950033.95 0.181051 -0.087219 -0.140064
> > 1118950034.00 0.180136 -0.0861511 -0.133351
> > 1118950034.05 0.181509 -0.0818796 -0.129994
> > 1118950034.10 0.183188 -0.0852358 -0.132893
> > 1118950034.15 0.182425 -0.0824898 -0.12618
> > 1118950034.20 0.186239 -0.0805066 -0.122976
> > 1118950034.25 0.185324 -0.0815745 -0.121298
> > 1118950034.30 0.190359 -0.0751672 -0.106499
> > 1118950034.35 0.19219 -0.078676 -0.105584
> > 1118950034.40 0.191275 -0.0783708 -0.101159
> > 1118950034.45 0.19631 -0.0728789 -0.0868182
> > 1118950034.50 0.195242 -0.0795913 -0.0877336
> > 1118950034.55 0.200736 -0.0783708 -0.0849874
> > 1118950034.60 0.19921 -0.0811168 -0.080563
> > 1118950034.65 0.202567 -0.0795913 -0.0799527
> > 1118950034.70 0.202567 -0.0800489 -0.0729347
> > 1118950034.75 0.203177 -0.0873715 -0.0814784
> > 1118950034.80 0.203024 -0.0821847 -0.0761385
> > 1118950034.85 0.201499 -0.084473 -0.0767488
> > 1118950034.90 0.202261 -0.0892022 -0.0836143
> > 1118950034.95 0.199362 -0.0913379 -0.0874284
> > 1118950035.00 0.198599 -0.0948466 -0.0923106
> > 1118950035.05 0.19921 -0.0919481 -0.09109
> > 1118950035.10 0.197379 -0.0960671 -0.0964298
> > 1118950035.15 0.195853 -0.0989656 -0.0996337
> > 1118950035.20 0.193259 -0.098813 -0.108177
> > 1118950035.25 0.193564 -0.101406 -0.116569
> > 1118950035.30 0.190817 -0.0959145 -0.111534
> > 1118950035.35 0.18685 -0.101712 -0.12679
> > 1118950035.40 0.185782 -0.0948466 -0.123281
> > 1118950035.45 0.184103 -0.0983554 -0.132588
> > 1118950035.50 0.182577 -0.100339 -0.139606
> > 1118950035.55 0.181509 -0.0962196 -0.13686
> > 1118950035.60 0.177237 -0.102017 -0.148455
> >
Other way to do the same thing would be to sown sample the moving
average filter output by 20.

Regards,
Amit

________________________________

From: m... [mailto:m...] On Behalf
Of Nandan Das
Sent: Tuesday, May 30, 2006 9:35 PM
To: a...@yahoo.co.uk
Cc: m...
Subject: Re: [matlab] question on Averages in Excel tabel
My previous email will find the moving average..so first valid (ignoring
initial transient) output == average of samples 1 to 20, second output is
average of samples 2 to 21 and so on. However, if you want to do
averaging
of samples 1 to 20 and then of samples 21 to 40 and so on, all you
should do
is to probably to first reshape your data such that each row has 20
samples
(So use "reshape" command). And then find the average of each row (use
"mean" command).

Nandan

On 5/30/06, Nandan Das wrote:
>
> Try using the filter command. Have your filter taps as num => 1/20*ones(20,1). So do something like filter(num,1,your_data).
>
> That will give you a moving average of the 20readings. You will need
to
> account for the latency in the filter to line things up properly.
>
> hope this is clear.
>
> Nandan