Hello,
I want to solve a system of linear equations, but there is a slight twist in the equation (i.e. not every one is written Ax = B). How can I use matlab to solve this? I want to know xH. I suppose I will use linsolve command, but I don't know what exact manipulation will need to be made. Thanks
% Vapor Pressure of n-Hexane (kPa)
PH = zeros(5,1);PH(1) = 101.3;PH(2) = 136.7;PH(3) = 197.3;PH(4) = 284.0;PH(5) = 456.0;% Vapor Pressure of n-Octane (kPa)
PO = zeros(5,1);PO(1) = 16.1; PO(2) = 23.1;PO(3) = 37.1;PO(4) = 57.9;PO(5) = 101.3;% Liquid Mole fraction of n-Hexane in n-Hexane/n-Octane mixture
xH = zeros(5,1);xH(1)*PH(1) + (1-xH(1))*PO(1) - 101.32 = 0;xH(2)*PH(2) + (1-xH(2))*PO(2) - 101.32 = 0;xH(3)*PH(3) + (1-xH(3))*PO(3) - 101.32 = 0;xH(4)*PH(4) + (1-xH(4))*PO(4) - 101.32 = 0;xH(5)*PH(5) + (1-xH(5))*PO(5) - 101.32 = 0;
Best Answer