Average calculation only on a part of the data
Hi !
I would like to know if there is an option to calculate the average of a channel, but only for one part of the channel data.
Like if I have 100000 samples and I would like to calculate the average only on the first 400 samples...
Thanks for your reply,
Alex
Software Test Engineer I
Hello,
yes this is possible, you just need to add some math formulas. One for sample counting (scnt), two logical formulas which give you 1 when you reach your sample count and the statistic, which is set on start-stop blocks. You can add all this in analysis, you don't need to do this in measure. Attached you'll find a setup, with two formulas for triggers, a sample counter, a sample counter for a async signal, a signal, and the statistic.
Hope this help you with your project.
Urban
Attached files:
Hi !
I tried it with the Stat. basic. function with a bloc of 400 samples without recoupling.
It works, but I didn't succeed in analysing only the first bloc so on the 400 first samples...
I used this formula : AverageValueEvery400Samples.data(0), but it didn't work...
It seems that this only copies my average signal already obtained.
Do you have any clue to just grab the first block of this average ?
Thank you !
Alex
Software Test Engineer I
Hi,
can you please send your setup file and explain more what you want to do, because I don't completely understand the issue in your last post.
Here is the setup file.
I just want to calculate the average on the first block (the average for the 4 first milliseconds of the "Pression" signal).
Attached files:
Software Test Engineer I
I attached an edited version which calculates the average of the section which is marked on the picture. You can change this window by tooning the Trigger1 and trigger2 formulas.
Attached files:
That wasn't that part, but I should be able to do something with your formula.
Thanks a lot for your fast answers !