Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

Equilibria with Two or More Equations

Step 1 Here you use the global command in run equil eq global, set the variables, and repeat the global command in the function equil eq global. Then those variables are accessible to the function (see Appendix B for additional information). [Pg.47]

Step 2 Leave off the in the running program so the data is repeated in the output. [Pg.47]

Step 3 When using the global command, you must be sure to use the global command in the command window (or a run program that runs in the command window), set the variables after the global statement, and then repeat the global statement in the function. If you do not follow these mles, MATLAB will inform you that it was asked for an undefined variable or function, and give you the m-file and line number where it appears. [Pg.47]

Step 4 When you run this program the results are the same as before, which checks your modification to use the global option. To solve the problem in Table 4.3, you change the input value in nm equil eq global to 1, 1.8, 0.3, and 0.1, respectively. The answer is [Pg.47]

In this case MATLAB could not find a solution when starting from a guess of 0.5. After some experimentation, using a guess of 0.99 worked and gave the answer provided above. [Pg.47]


See other pages where Equilibria with Two or More Equations is mentioned: [Pg.47]    [Pg.47]   


SEARCH



Two equations

© 2024 chempedia.info