Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 07/02/2014 in all areas

  1. You have to be careful with the FIR filter the way you're using it because it applies a shift to your data by the amount of "Num of Averages". To fix that, you have to do some padding at both ends of your input data. In this example I just repeat the first and last value: If you run it through a graph it becomes obvious:
    2 points
  2. That's not quite a moving average, rather a down-sampling - i.e. Filtered Array is shorter than Input Data. Your first solution is pretty good - just speed it up with a Parallel For Loop. An alternative is to reshape into a 2D array. Both these come out roughly the same speed, about 5x faster on my machine than your solutions above. If you want a true Moving Average (where the result is the same length as the original) I think this suggestion from the NI forums using an FIR filter is nice and simple, although you might look carefully at the first Num values if that's important.
    1 point
  3. Holly and I are registered and will have a door prize from DISTek once again. This year, DISTek is offering up a Quad-core, 1.6GHz 2G RAM 8G Flash Android Mini PC. Connects to your HD TV via HDMI 3.5mm headset jack (mic embedded) Micro USB, USB and SD card Wi-Fi 802.11b/g/n Bluetooth DLNA Miracast
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.