📄 setstate.m
字号:
%SETSTATE Set map state vector and state covariance matrix.% M = SETSTATE(M,X,C) overwrites the map state vector and the state% covariance matrix by X and C respectively. The size of X is nx1, % the size of C is nxn where n equals the number of features in M% times their number of parameters plus three from the robot.%% See also MAP/GETSTATE, MAP/SET.% v.1.0, Nov. 2003, Kai Arras, CAS-KTHfunction m = setstate(m,X,C);nF = length(m.X); % recast C into blockwise structureiacc = 1;for i = 1:nF, jacc = 1; for j = 1:nF, [nr,nc] = size(m.C(i,j).C); m.C(i,j).C = C(iacc:iacc+nr-1,jacc:jacc+nc-1); jacc = jacc + nc; end; iacc = iacc + nr;end;% recast x into blockwise structure and establish consistency between C and featuresiacc = 1;for i = 1:nF, nr = length(get(m.X{i},'x')); m.X{i} = set(m.X{i},'x',X(iacc:iacc+nr-1),'c',m.C(i,i).C); iacc = iacc + nr;end;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -