Bayesian estimation example:
We have two measurements of state (x) using two sensors. x1=3 from sensor 1 and x2=5 from sensor 2. We know that sensor 1 has zero mean Gaussian noise with variance=1 and sensor 2 has zero mean Gaussian noise with variance=0.25. Find MMSE estimate of x and its variance.
Solution: From the code attached we get:
Expected value of x=4.6
Variance of x=0.2
This can be related to Kalman filter estimation as:
Ayad Al-Rumaithi (2020). Bayesian Estimation Example (https://www.mathworks.com/matlabcentral/fileexchange/71993-bayesian-estimation-example), MATLAB Central File Exchange. Retrieved .
comments in code