Compute program costs

Computes the cost of a variety of aerospace projects.
------------------------------------------------------------------------
See also Inflation
------------------------------------------------------------------------
%--------------------------------------------------------------------------
%   Copyright (c) 2009, 2014 Princeton Satellite Systems, Inc.
%   All rights reserved.
%--------------------------------------------------------------------------
%   Since version 8.
%--------------------------------------------------------------------------

clear x;

vehicle = {'Shuttle' 'Hermes' 'Ariane5' 'Pegasus'};
cost = [57e9 7.6e9 8e9 55e6];
basisYear = [1992 1992 1996 1999];

shuttleMass = (176.056 + 59.4 + 2*186.8)/2.205;
emptyMass = [shuttleMass 23 39.8+12.7+2.7 1.868+.345+.203]*1000;
ref = {'Space Shuttle Value Open to Interpretation, Roger A. Pielke, Jr., Aviation Week, July 26, 1993, pp. 57-58'...
       'http://www.astronautix.com/craft/hermes.htm'...
       'http://www.astronautix.com/lvs/ariane5.htm'...
       'http://www.astronautix.com/lvs/pegasus.htm'...
      };


x = cell(length(vehicle),4);

for k = 1:length(vehicle)
    i      = Inflation(basisYear(k),2009);
    x{k,1} = vehicle{k};
    x{k,2} = round(emptyMass(k));
    x{k,3} = sprintf('$%6.0fM',cost(k)*i/1e6);
    x{k,4} = sprintf('$%6.0f/kg',cost(k)*i/emptyMass(k));
end

disp(x)

%--------------------------------------
    'Shuttle'    [276216]    '$ 90154M'    '$326391/kg'
    'Hermes'     [ 23000]    '$ 12021M'    '$522634/kg'
    'Ariane5'    [ 55200]    '$ 11307M'    '$204836/kg'
    'Pegasus'    [  2416]    '$    73M'    '$ 30078/kg'