%% Reset State and State Estimation Error Covariance in ekfSLAM Object
% Specify the initial vehicle state.

initialState = [1; -2; 0.1];

% Specify the initial vehicle state covariance.

initialStateCovar = 0.1*eye(3);

% Create an ekfSLAM object with initial state and initial state covariance.

ekfSlamObj = ekfSLAM('State',initialState, ...
                     'StateCovariance',initialStateCovar);

% Get the state and the state covariance from the ekfSLAM object.

ekfSlamObj.State
ekfSlamObj.StateCovariance

% Reset the state and state estimation error covariance to the default value.

reset(ekfSlamObj)

% Get the state and the state covariance from the ekfSLAM object.

ekfSlamObj.State
ekfSlamObj.StateCovariance

% Copyright 2021 The MathWorks, Inc.