check_condition.m

来自「matlab代码」· M 代码 · 共 36 行

M
36
字号
function flag = check_condition( path , end_list , branch_list )

                        % check two conditions here
                        % if any one of the condition match
                        % break the loop
                
                                [len ,ddummy] = size(path);

                                curr_x = path(len,1);
			
                                curr_y = path(len,2);

                                        
				    flag = 0 ;
        
                                if is_a_branch_point(curr_x,curr_y,branch_list) == 1
%        '---> is a branch'
                                %need to delete it from output image
                                %   
                                        flag = 1;
                                
                                elseif is_a_end_point(curr_x,curr_y,end_list) == 1

%        '--->is a end'
                                %need to delete it from output image
                                %
                                        flag =1;
                                
                                elseif curr_x == 0 & curr_y == 0

%        '---> curr is 0'
                                        flag = 1;

                                end;

⌨️ 快捷键说明

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