clear; clc; // Stoichiometry // Chapter 4 // Material Balances involving Chemical Reaction // Example 4.14 // Page 140 printf("Example 4.14, Page 140 \n \n"); // solution // using equations of example 4.10 // soving 4.10 by linear model method M = [1 0 0 0 0 0 0 0 0 0 0 0 0 0 0;0 1 0 0 0 0 0 0 0 0 1 1 1 1 2;0 0 1 0 0 0 0 0 0 0 .5 1.5 0 -.5 0;0 0 0 1 0 0 0 0 0 0 -1 -2 0 0 -1;0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0;0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0;0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0;0 0 0 0 0 0 0 1 0 0 0 0 -2 0 0;0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0;0 0 0 0 0 0 0 0 0 1 0 0 0 0 -1;0 0 0 0 0 0 0 0 0 0 1 1 1 1 2;0 0 0 0 0 0 0 0 0 0 .5 1.5 0 -.5 0;0 0 0 0 0 0 0 0 0 0 -1 -2 0 0 -1;0 0 0 0 0 0 0 0 0 0 0 0 0 1 0;0 0 0 0 0 0 0 0 0 0 0 0 0 0 2] V = [1058.1;125;281.27;23.73;0;0;0;0;0;0;.99*125;.2437*281.27;-5.4756*23.73;.61875;1.98] X = M\V disp(X)