dropfall.m

来自「Drop fall algorithm used to segmentate d」· M 代码 · 共 23 行

M
23
字号
function [tile1, tile2] = dropfall(tile, dir)
width=size(tile,2);
height=size(tile,1);
dir
cut=zeros(height,1);
if strcmp(dir,'bottom-right')==1
tile=fliplr(tile);
tile=flipud(tile);
elseif strcmp(dir, 'bottom-left')==1
tile=flipud(tile);
elseif strcmp(dir, 'top-right')==1
    tile=fliplr(tile);
end
%look for starting point to begin cutting at
%Stored under variable start_x
for row=1:height
found_candidate=0;
found_start=0;
candidate_x=0;
candidate_y=0;
start_x=0;
start_y=0;
%Check the 搑ight three fourths minus some

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?