File Exchange

image thumbnail

Kalman Filter Tutorial

version (1.82 KB) by Jose Manuel Rodriguez
Extended Kalman Filter Tutorial


Updated 18 Sep 2006

No License

This is a simple demo of a Kalman filter for a sinus wave, it is very commented and is a good approach to start when learning the capabilities of it.

Cite As

Jose Manuel Rodriguez (2021). Kalman Filter Tutorial (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (37)

Farnaz Forooghifar

Tarig Ahmed

This is a good exercise...but the "clear all; close all;" costed me a whole day's work. As someone pointed in this thread: bad style! You should not do such things on someone else's machine. Please comment the "clear all; close all;" and leave it to the users to do that if they desire.

Mahdi Torabi


Ziling Zhang

It's very helpful!Thank you so much!

Angel Lopez

Thanks, it is very useful!


any example on structural dynamics system identification

benny goh

The observation function h is a linear function. Can it be a linear function for EKF?

cronix batman

tq brothers


levi chu


ahmed ghazi


Tim Davis

Nice commentgs. Awful numerics. Never multiply by inv(S). It's unstable and slow.


K = P*H'*inv(S)


K = (P*H')/S

xu yan

I hope it can make my work easy.

nihat korkmaz

good idea yeah

dinesh kumar

i like it. because usefull my project learning matlab programes ,i want particles tilter.

Luis E. Avendaño

Is an excelent application for my personal work

yousef holba

very importantfor me applications

ankit bansal

thats great to learn abt kalman

mohsen zamani


manoj rai

a good approach to learn kalman

Ihsan ulhaq


said hared

i need it

Rodrigo Badínez

Very nice tutorial.
(only the magenta plot is a little confusing at the first sight, it's not a part of the EKF)

Mauro G.

It is easy to improve for another signals

Daniel G.

BE CAREFUL! It may be a good demo, but it clears all your variables and closes all your figures without asking you! Just imagine you are working for many hours on some important topic and you are just about to present or save your result, so trying this tutorial at this point will be fatal for you! I can't understand why someone does "clear all; close all;" on a foreign machine!!! Bad style!

Hongchao Fan

very good

Markus B

This is an example, not a tutorial.

Alireza Key

great for beginner ...
tanx Jose

elhadi dendene

that's a good work

aswardi mawardi

This methode is used for teaching

Andleeb shadman

Tansel Yucelen

Very good code, Thank you.

Yuriy Ivanov

Not a bad, but you must add more comments.

Ali Özgül

Succesfully your code technique and application. Thank you.

MATLAB Release Compatibility
Created with R14SP1
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: Learning the Kalman Filter

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!