%% Retrieve All Landmark Information from ekfSLAM Object
% Specify the initial vehicle state.

initialState = [1; -2; 0.1];

% Specify the initial landmark positions.

landmarkPosition = [15.8495; -12.9496;
                    25.2455; -15.4705;
                    37.5880;   3.1023;
                    16.5690;   2.7466];

% Specify the initial vehicle state covariance.

initialStateCovar = diag([0.1*ones(1,3) 1.1*ones(1,8)]);

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

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

% Get the information for all the landmarks.

info = landmarkInfo(ekfSlamObj)

% Copyright 2021 The MathWorks, Inc.