function reduceBlock(fname)
% reduceBlock  Data reduction for single block experiment

if nargin<1, fname='mySampleData.mat';  end
verbose = true;

% --- Define constants, material properties, etc.
Rsh = 5.01e-3;   uRsh = 0.23e-3;   % Resistance of shunt resistor, and its uncertainty   

% --- Read raw (averaged) data and convert it
[Ts,uTs,Ta,uTa,Vsh,uVsh,Vh,uVh] = getBlockData('mySampleData.mat');

% --- Compute electrical input power and its uncertainty.  Use analytical
%     formulat for uncertainty because its exact and easy
Ein = Vh.*Vsh./Rsh;
uEin = Ein.*sqrt( (uVh./Vh).^2 + (uVsh./Vsh).^2 + (uRsh./Rsh).^2 );

h = htc(Ts,uTs,Ta,uTa,Ein,uEin);

% ... MORE CODE HERE

% --- Print results
if verbose
  fprintf('\nReduced data from %s:\n\n',fname);
  fprintf('  Ts    uTs    Ta    uTa    Ein   uEin\n');
  for i=1:length(Ts)
    fprintf('%6.2f %5.2f %6.2f %5.2f %6.2f %5.2f\n',...
            Ts(i),uTs(i),Ta(i),uTa(i),Ein(i),uEin(i));
  end
end

% ==================================
function h = htc(Ts,uTs,Ta,uTa,Ein,uEin)

% ... MORE CODE HERE