create_slot.m
来自「目标跟踪的扩展卡尔曼滤波算法主函数的文件是:kal_demo.m 近似网格」· M 代码 · 共 45 行
M
45 行
function [ slot ] = create_slot()
% Create a slot of an object
%
% INPUT
% none
% OUPUT
% slot(1, t) : the location x of an object at time t
% slot(2, t) : the location y of an object at time t
%
% Create a slot of an object in the area of 100 * 100
for t = 1:50
slot(1,t) = t;
slot(2,t) = t^2 / 100;
end
%for t=51:100
% slot(2,t) = t - 24;
% slot(1,t) = (t - 50)^2 / 100 + 50;
%end
for t=100:-1:51
slot(1,t)=t-1;
slot(2,t)=(101 - t)^2/100;
end
%for t = 1:100
% slot(1,t) = t;
% slot(2,t) = t;
%end
%for t = 1:100
% slot(1, t) = t;
% slot(2, t) = t^2 / 100;
%end
%for t = 0:49
% slot(1, t + 1) = t;
% slot(2, t + 1) = (sqrt(2500 - slot(1, t + 1)^2)) * -1 + 50;
%end
%for t = 50:99
% slot(1, t + 1) = 100 - t;
% slot(2, t + 1) = sqrt(2500 - slot(1, t + 1)^2) + 50;
%end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?