The issue could be related to inconsistent use of scalars vs vectors. I notice your F, H are matrices for a state vector of one. But Q and R and P0 are scalars, not 1x1 matrices. And x0 looks like a scalar. My guess is you need to use 1-vectors for state and measurement, and 1x1 matrices for the covariances.

This is a common mismatch everyone can make, where I feel the error messages are hard to understand, since it’s not obvious that it’s from multiple dispatch. Matlab would probably not even notice since it treats scalars as matrices, and even if it did, it often gives a helpful message about size mismatches.

I wonder if better errors could be produced by intentionally defining mismatched scalar-vector methods that only produce semi-helpful error messages. It may also be helpful to define some pure scalar systems since they are so common. (Maybe they already are?) But still people will mismatch.

Edit: Forgot to mention the clue is method missing error. Subtracting a float and a vector suggests the mismatch.