% script for filling with given parameters % the main program runs in ex2.m % here comes the coefficients matrix A % an 11x11 matrix... % Y C I NX R Yw Cw Iw NXw Rw E equations from page 3 of the handout A=[ 1 -1 -1 -1 0 0 0 0 0 0 0 % (1) Y-C-I-NX = G -b 1 0 0 0 0 0 0 0 0 0 % (2) -bY+C = a-bT 0 0 1 0 d 0 0 0 0 0 0 % (3) I+dR = c e 0 0 0 -f 0 0 0 0 0 0 % (4) eY-fR = M/P h 0 0 1 0 -h 0 0 0 0 -i*Pw/P % (5) hY+NX-hYw-i*Pw/P*E = g 0 0 0 0 0 1 -1 -1 -1 0 0 % (6) Yw-Cw-Iw-NXw = Gw 0 0 0 0 0 -bw 1 0 0 0 0 % (7) -bYw+Cw = aw-bwTw 0 0 0 0 0 0 0 1 0 dw 0 % (8) Iw+dwRw = cw 0 0 0 0 0 ew 0 0 0 -fw 0 % (9) ewYw-fwRw = Mw/Pw 0 0 0 1 0 0 0 0 1 0 0 % (10) NX+NXw = 0 0 0 0 0 -1 0 0 0 0 1 0]; % (11) -R+Rw = 0 % now the right-hand side of the equations % i.e. vector B B=[G; a-b*T; c; M/P; g; Gw; aw-bw*Tw; cw; Mw/Pw; 0; 0];