function [ ca_next, us_next ] = california_migration_scalar ( ca, us )

%*****************************************************************************80
%
%% california_migration_scalar() approximates next year's California population.
%
%  Discussion:
%
%    For a while in the 1960's, the following statement was approximately true:
%
%   "Every year, 30% of the population of California leaves the state, and
%    every year, 10% of the population of the other states moves to California."
%
%    1) The statement sounds nonsensical.  Can we write down some equations
%       that give us numbers we can think about?
%
%    2) If 30% move out, and 10% move it, does this mean California is
%       gradually going to have no population at all?
%
%    3) If this behavior lasts long enough, does the population curve
%       of California look chaotic, go towards infinity, become negative, 
%       or oscillatory, or does it settle down?
%
%    We can make some simplifying assumptions:
%
%    * Assume that the 30% and 10% values are exact and don't change.
%
%    * The population estimates will be real numbers with fractional parts,
%      but we'll just accept figures like a population of 10,000.73
%
%    * Find the populations of California and the US in 1960, and assume
%      that the total population never changes after that, but just
%      moves back and forth.
%
%    Our goal will be simply to compute the populations of California and
%    the US (minus California), for each year, from 1960 onwards, and to
%    plot the California population, and to compute it long enough that
%    we feel we understand the pattern, if any.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 January 2025
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real CA, US: the populations of California and the rest of the US
%    at the end of this year.
%
%  Output:
%
%    real CA_NEXT, US_NEXT: the populations next year.
%
  ca_next = 0.70 * ca + 0.10 * us;
  us_next = 0.30 * ca + 0.90 * us;

  return
end

