function alignment = initialize_pairwise(alignment)

%Pass alignment property to local variable
seq01 = alignment.seq01;
seq02 = alignment.seq02;

%Get length of both sequences to know how many cycles will be needed
seq01_length = length(seq01);
seq02_length = length(seq02);

%Initialize matrices
score_matrix     = zeros(seq01_length+1, seq02_length+1);
direction_matrix = zeros(seq01_length+1, seq02_length+1);

%Fill first row with values for insert
for i = 2 : seq01_length +1
    
    score_matrix(i,1) = ( i - 1 ) * alignment.gap;
    direction_matrix(i,1) = alignment.delete_symbol;
    
end

clear i;

%Fill first column with values for delete
for i = 2: seq02_length + 1
    
    score_matrix(1,i) = ( i - 1 ) * alignment.gap;
    direction_matrix(1,i) = alignment.insert_symbol;
    
end

alignment.score_matrix = score_matrix;
alignment.direction_matrix = direction_matrix;
