% Combine Maureen's fed, state, and nipa files which contain data for
% NIPA TABLE 3.12 into data file nipa312.dat.

x1=[ ...
25.7
27.5
31.5
32.6
34.5
36.0
39.1
43.6
52.3
60.6
67.5
81.8
97.0
108.4
124.1
147.4
185.7
202.8
217.5
234.8
262.8
312.6
355.7
396.3
426.1
437.8
468.1
497.1
521.3
555.9
603.8
666.3
749.2
837.9
892.6
];
x24=[ ...
zeros(11,1);
.1
.4
.6
1.1
1.0
1.0
1.0
1.0
1.0
1.7
1.8
1.7
1.7
1.7
1.6
1.6
1.6
1.5
1.5
1.5
1.4
1.4
1.4
1.4];

x15=[ ...
zeros(24,1);
.1
.1
.1
.2
.2
.3
.3
.3
.2
.4
.4
];
x16=[ ...
.7
.7
.9
.7
.8
.6
.6
.7
.8
.7
.7
.8
.8
.8
.8
.9
.9
.9
1.0
1.0
1.1
1.2
1.3
1.4
1.4
1.4
1.6
1.7
1.7
1.7
1.8
1.9
1.9
1.9
1.9
];
x17=[ ...
.1*ones(12,1);
.2
.2
.2
.3
.4
.5
.6
.6
.7
.8
.9
.9
.9
1.0
1.1
1.1
1.2
1.3
1.4
1.5
1.6
1.8
1.8
];
x18=[ ...
zeros(8,1);
.1
.1
.2
.2
.2
.3
.3
.3
.3
.3
.3
.3
.3
.4
.4
.5
.6
.7
.8
.9
1.1
1.3
1.3
1.5
1.7
1.7
1.8
];
x19=[ ...
3.8
3.7
3.8
3.8
3.9
4.0
4.2
4.1
4.8
5.1
5.8
6.6
7.5
8.5
9.3
10.5
12.9
12.8
12.3
12.5
13.0
13.4
14.4
14.9
15.0
14.8
15.0
14.9
14.8
15.0
15.4
15.8
16.2
16.7
17.5
];
x8=[ ...
.3
.2
.3
.2
.1*ones(13,1);
.2
.2
.2
.1
.2
.3
.4
.4
.2
.2
.2
.1*ones(7,1)];
x9=[ ...
.2
.1
.2
.1
.2
.1
.1
.1
.1
.1
.1
.3
.5
.5
.3
.4
.8
.9
.7
.5
.4
.5
.5
.3
.4
.3
.3
.3
.3
.3
.3
.4
.5
1.2
1.2];


load fed.dat
load state.dat
load nipa.dat
z  = [fed(1:35,:),fed(36:70,:),fed(71:105,:), ...
      fed(106:140,:),fed(141:175,:)];
fed= z;
z  = [state(1:35,2:8),state(36:70,2:9)]; 
state=z;
z  = [nipa(1:13,2:11),nipa(14:26,2:11), ...
      nipa(27:39,2:11),nipa(40:52,2:11), nipa(53:65,2:4)];
nipa =z;

t      = [[1946:1958]';fed(:,1)];
x(:,2) = fed(:,2);
x(:,4) = fed(:,4);
x(:,5) = fed(:,7);
x(:,6) = fed(:,13);
x(:,7) = fed(:,17)+fed(:,18);
x(:,9) = fed(:,20)+fed(:,23);
x(:,10)= fed(:,19);
x(:,12)= fed(:,25);
x(:,13)= fed(:,24);
x(:,14)= fed(:,33);
x(:,19)= fed(:,26);
x(:,20)= fed(:,27);
x(:,23)= fed(:,31);
x(:,24)= fed(:,12);
x(:,25)= fed(:,11);
x(:,27)= fed(:,32);

x(:,29)= state(:,1);
x(:,30)= state(:,2);
x(:,31)= state(:,3);
x(:,32)= state(:,4);
x(:,33)= state(:,5);
x(:,34)= state(:,6);
x(:,35)= state(:,7);
x(:,36)= state(:,8);
x(:,37)= state(:,9);
x(:,38)= state(:,10);
x(:,39)= state(:,11);
x(:,40)= state(:,12);
x(:,41)= state(:,13);
x(:,42)= state(:,14);
x(:,43)= state(:,15);

x =[nipa;x];
x(14:48,1)  = x1;
x(14:48,8)  = x8;
x(14:48,9)  = x9;
x(14:28,7)  = x(14:28,6)-x(14:28,8)-x(14:28,9)-x(14:28,10);
x(14:48,15) = x15;
x(14:48,16) = x16;
x(14:48,17) = x17;
x(14:48,18) = x18;
x(14:48,19) = x19;
x(14:48,24) = x24;
x(14:48,11) = x(14:48,12)+x(14:48,13);
x(14:48,3)  = sum(x(14:48,[4,5,6,11,14:18])')';

x= x';
x=[t';x];
