Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Moving average filter for MC solution of PDE

  1. Mar 3, 2013 #1


    User Avatar
    Gold Member

    I have a PDE that can be interpreted as basically an exit time problem for a certain stochastic process. I would like to use this to verify an analytical solution I've found. If I start the stochastic process at (x,y), then the average exit time from a certain region will be equal to the value of the solution of the PDE I care about at (x,y).

    I could divide up my region into a discrete set of points and find the average for each of those. However that wastes some of the data because, say I start the process at x0, y0. During the next time step the position is x1, y1, and so if the total exit time is T then not only do I have the data point

    x0, y0, T

    but also

    x1, y1, T - dt

    However x1, y1 is probably not exactly one of any predefined start points I defined.

    So what I would like to do is take the whole list of data

    { { x0, y0, T}, {x1, y1, T-dt}, {x2, y2, T- 2 dt}, ... }

    And apply a moving average filter. Is there a built in method for doing this in Matlab or Mathematica? I can find documentation for things like the filter2 command in Matlab, this seems to apply more to a case where your data is indexed by a discrete sets of points so that you can arrange it in for example a matrix. That's not the case here where the data is basically indexed by floats.
  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted

Similar Threads for Moving average filter
Kalman filter and dt jitter