% print a table of lapse rates
% (revised Sep 2022)

% coordinates: pressure (mb), temperature (deg C)
  
T_C = ([-40 -20 0 20 40 60])' % rows

p_mb = ([1000 850 700 300 100])  % columns
 
% make an m x n array of lapse rates (K/km)

m = length(T_C);   % rows
n = length(p_mb);  % columns

gamma = zeros(m,n);

% assign some floating point numbers

for i = 1:m
    for j = 1:n
        gamma(i,j) = 3*sqrt(i+j);
    end
end

 print_gamma( gamma, m, n, p_mb, T_C )