function acc_cost_mat = acc_cost_matrix_no_region(cost_matrix)
    n_timestamps_1 = size(cost_matrix,1);
    n_timestamps_2 = size(cost_matrix,2);
    
    acc_cost_mat = zeros(n_timestamps_1, n_timestamps_2);
    acc_cost_mat(1,:) = cumsum(cost_matrix(1,:));
    acc_cost_mat(:,1) = cumsum(cost_matrix(:,1));
        
    for j = 2:n_timestamps_2
        for i = 2:n_timestamps_1
            acc_cost_mat(i, j) = cost_matrix(i, j) + ...
            min([acc_cost_mat(i - 1, j - 1) acc_cost_mat(i - 1, j)...
            acc_cost_mat(i, j - 1)]);
        end
    end    
end

