📄 create_slot.m
字号:
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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -