Thank you for your work on this file. It has been helpful to me as I begin learning Kalman Filter.
I am having a few issues with the code and was wondering if anyone else was too. Matlab is not my primary software, so I am wondering if it might be something simple (perhaps I need additional toolboxes). When I try to run the example, I get the following errors:
Error using sym/subs>normalize (line 206)
Entries in OLD must be scalar.
Error in sym/subs>mupadsubs (line 136)
[X2,Y2,symX,symY] = normalize(X,Y); %#ok
Error in sym/subs (line 124)
G = mupadsubs(F,X,Y);
Error in ensemblekfilter3 (line 63)
x_true=subs(f,var_vector,x_true)+w.*randn(p1,1); %compute true value of state at next
It seems I have found a solution by changing the loop to be:
for j=1:p1 %create vector containing variables x1 to xn
eval(sprintf(' syms x%d', j));
temp = sprintf('x%d ',j);
var_vector = [var_vector; sym(temp)];
%var_vector=[var_vector sprintf('x%d ',j)];
If anyone else has experienced similar errors or has further insight into mine, it would be appreciated.