Skip to content
find_parents.m 716 B
Newer Older
function [ code ] = find_parents( cell )
% assumption, initial input will be grid we want to find parents for not
% parent cell itself

code = '';
if isempty(cell)
    % current cell is empty
    code = '';
else
    if isempty(cell.parent_grid.parent_cell)
        % no parent cell
        
    else
        % there is a parent cell
        top = char(CVC_checker.find_parents(cell.parent_grid.parent_cell));
        code = char(cell.parent_grid.parent_cell.cond_text);
        if isempty(top);
            % there were no more above this cell
            
        else
            % there were more above this cell
            code = [code ' AND ' top];
        end
        
        
    end
    
    
end




end