This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

How to use movingaverage
#2
The value field is updated at the rate of the analysis block, so nothing really to see here at about 100 Hz. In order to get a better understanding of what's going on, it makes sense to plot the containers against time. You will observe then that the “current” value is averaged with “width” previous values (a total of 11 data points in your case).

There is a rather common … unintendedness in your .phyphox file: you would like to keep the x data, accordingly
Code:
    <movingaverage>
      <input as="data" keep="true">x</input>
      <input as="width" type="value">10</input>
      <output as="data">xAvg</output>
    </movingaverage>

Without “keep” the x container is cleared when exiting this block. Do not use “append” for xAvg. I still need to find a clever way to optimise taking the moving average, so for the time being better take all recorded data in each run.
Reply


Messages In This Thread
How to use movingaverage - by SiFreZi - 03-31-2025, 05:31 PM
RE: How to use movingaverage - by Jens Noriʇzsɔɥ - 04-01-2025, 07:12 PM

Forum Jump: