function [ age, total_this_year, male_this_year, female_this_year ] = ...
  mortality_this_year ( )

%*****************************************************************************80
%
%% mortality_this_year() returns probability of death this year.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 February 2024
%
%  Author:
%
%    John Burkardt
%
%  Output:
%
%    integer age(115): the age_brackets, in years, from 0:1 to 114:115.
%
%    real total_this_year(115), male_this_year(115), female_this_year(115): 
%    the probability that a person alive at the beginning of the age bracket 
%    will die by the end of that age bracket.
%
  [ age, total, male, female ] = mortality_count ( );

  n = length ( age );

  total_this_year = zeros ( n, 1 );
  pop_this_year = sum ( total );
  for i = 1 : n
    total_this_year(i) = total(i) / pop_this_year;
    pop_this_year = pop_this_year - total(i);
  end

  male_this_year = zeros ( n, 1 );
  pop_this_year = sum ( male );
  for i = 1 : n
    male_this_year(i) = male(i) / pop_this_year;
    pop_this_year = pop_this_year - male(i);
  end

  female_this_year = zeros ( n, 1 );
  pop_this_year = sum ( female );
  for i = 1 : n
    female_this_year(i) = female(i) / pop_this_year;
    pop_this_year = pop_this_year - female(i);
  end

  return
end

