Newer
Older
abgabensammlungSS15 / mr / ub8 / localize_jp / measurement.m
@Jan-Peter Hohloch Jan-Peter Hohloch on 20 Jun 2015 365 bytes MR: A1
function [ z H ] = measurement( x )
%MEASUREMENT Measurement Model: Measure the robot's distance from origin.

% YOUR CODE STARTS HERE

z = sqrt(x(1)*x(1)+x(2)*x(2)); % fill this with the measurement result
syms x1 x2 x3
H=jacobian(sqrt(x1*x1+x2*x2),[x1;x2;x3]);
x1=x(1);
x2=x(2);
H = eval(H); % fill this with the measurement Jacobian

% YOUR CODE ENDS HERE

end