matlab - ??? Undefined function or method 'det' for input arguments of type 'double' and attributes 'full 3d real -
for j=1:length(idf) dx = xf(1,j)- xv(1); dy = xf(2,j)- xv(2); d2 = dx^2 + dy^2; d = sqrt(d2); z_est(:,j) = [d;atan2(dy,dx)-xv(3)]; s(:,:,j) = hf(:,:,j) * pf(:,:,j) * hf(:,:,j)' + r end v = zf - z_est; %innovation v(2,:) = pi_to_pi(v(2,:)); w= 1; n = 1:size(zf,2) den = 2*pi*sqrt(det(s)); neu = exp(-0.5 * v(:,n)' * inv(s) * v(:,n)); w = w*(neu/den); end
my program on computing weight of state particles according particle filtering,at start runs , calculate w,bt after sometime shows error ??? undefined function or method 'det' input arguments of type 'double' , attributes 'full 3d real''
. cant figure out problem.
you need give det
square matrix not 3d 1 (s
3d array). assume meant write instead:
den = 2*pi*sqrt(det(s(:,:,n));
so @ given loop iteration det
of slice of s being calculated.
Comments
Post a Comment