?? 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 + -