MATLAB: Assignment has more non-singleton rhs dimensions than non-singleton subscripts in UKF

codecode generationerrorfilterfunction

I'm trying to apply the unscented kalman filter as elaborated in the Artigo , to perform the estimation of the lambdah parameter of a time series. When implementing the code I get the following error
The commands in line 62 are hXi (:, k) = h (fXi (:, k)); and the error message i
Assignment has more non-singleton rhs dimensions than non-singleton subscripts
Error in Parametro_UKF (line 62) hXi(:,k) = h(fXi(:,k)); %h(Xi)
Hence I do not know how to do it because my measurement function only has three inputs of the five, that is, I only have the series of three variables. How to proceed, I'm trying to calculate the prediction of the measure through function h and Sigma Fxi points. I know there has to be dimensions, but I can not fathom how to correct.
It follows the implanted codes for the accomplishment of the parameter estimation.
I appreciate any help! If you notice any more errors please let me know, I do not know how to program very well!

Best Answer

hXi = zeros(18, 2*n+1);
for k = 1:2*n+1
hXi(:,k) = reshape( h(fXi(:,k)), [], 1); %h(Xi)
end
Related Question