title: Parameter estimation using Particle Filter in MATLAB
body: <p>After reading the docs about &quot;stateEstimatorPF&quot; I get a little confused about how to create the StateTransitionFcn for my case. In my case I have 10 sensors measurments that decay exponentially and I want to find the best parameters for my function model.</p>
  <p>The function model is x = exp(B*deltaT)*x_1, where x are the hypotheses, deltaT is the constant time delta in my measurments and x_1 is the true previous state. I would like to use the particle filter to estimate the parameter B. If I guess right, B should be the particles and the weighted mean of this particles should be what I'm looking for.</p>
  <p>How can I write the StateTransitionFcn and use the &quot;stateEstimatorPF&quot; to solve this problem?</p>
  <p>The code below is what I get so far (and it does not work):</p>
  <pre><code>pf = robotics.ParticleFilter
  pf.StateTransitionFcn = @stateTransitionFcn
  pf.StateEstimationMethod = 'mean';
  pf.ResamplingMethod = 'systematic';
  initialize(pf,5000,[0.9],1);
  measu = [1.0, 0.9351, 0.8512, 0.9028, 0.7754, 0.7114, 0.6830, 0.6147, 0.5628, 0.7090]
  states = []
  for i=1:10
      [statePredicted,stateCov] = predict(pf);
      [stateCorrected,stateCov] = correct(pf,measu(i));
      states(i) = getStateEstimate(pf)
  end
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  function predictParticles = stateTransitionFcn(pf, prevParticles,x_1)
      predictParticles = exp(prevParticles)*x_1 %how to properly use x_1?%;
  end
  </code></pre>