CBE Faculty |

Department of Chemical and Biological Engineering |

University of Wisconsin |

Madison, Wisconsin |

Copyright (C) 2014 Department of Chemical and Biological Engineering

Complete collections of the M-files for both Matlab and Octave in zip or tar.gz file formats are available for download from the following links:

**Matlab**:-
cbe255-matlab-m-files-v1.0.zip **Octave:**-
cbe255-octave-m-files-v1.0.zip

**Programming concepts: **introduction to Matlab, purpose of Matlab windows, accessing the online help system

** Accessing MATLAB and CAE Files (6 min)**

** Conditions and If Statements (38 min)**

** Examples with For Loops (34 min)**

**Chemical and biological engineering concepts: **chemical reactions, linear independence of reactions, reaction rates, production rates

**Computational concepts: **matrices, rank of a matrix, submatrices, reshaping matrices, solving least squares problems

**Programming concepts: **looping, conditionals, plotting, loading data from files, writing to the screen

**Broader applications of these concepts: **electrical circuit theory, network models, linear programming and game theory, financial models and optimization

Tutorial |

** Stoichiometry and Rates (42 min)**

** Estimating Reaction Rates (52min)**

**Chemical and biological engineering concepts: **heat transfer and mass diffusion, gradient and flux, thermal conductivity, heat capacity, diffusivity, dimensionless variables

**Computational concepts: **partial differential equations, implicit differential equations, differential-algebraic equations, orthogonal collocation, semi-infinite domains

**Programming concepts: **colloc program, functions, scripts, global statement, ODE solvers in Matlab, ode15i

**Broader applications of these concepts: **transport phenomena, rate processes, dimensional analysis

Tutorial |

**Chemical and biological engineering concepts: **process systems, reaction, separation, flash tank, recycle, material balances, degrees of freedom

**Computational concepts: **solving sets of nonlinear algebraic equations, Newton's method, Jacobian matrix

**Programming concepts: **looping, iteration, formatted output to the screen, user input from the keyboard, nonlinear algebraic equation solvers in Matlab

Tutorial |

Figure 2 (page 5):Two iterations of Newton's method for f(x) = x^3 - 2x^2 + 3x - 6 = 0. |

** Roots, Fzero, & Anonymous Functions (31 min)**

**Chemical and biological engineering concepts: **chemical kinetics, law of mass action, material balance, well-mixed reactor, reaction rates, production rates, complex dynamics, oscillations, Zhabotinsky reaction, coupled mass and energy balance for the CSTR

**Computational concepts: **ordinary differential equations, Euler method, stepsize, relative and absolute errors

**Programming concepts: **functions, scripts, global statement, ODE solvers in Matlab, ode15s

**Broader applications of these concepts: **dynamical systems, complex dynamics, oscillations, multiple steady states

Tutorial |

Tutorial |

**Chemical and biological engineering concepts: **fitting chemical and biological engineering models to data

**Computational concepts: **optimization, least squares, statistical confidence intervals, normal and uniform distributions, sampling, mean, variance

**Programming concepts: **parest.m, ellipse.m, Sundials package, hist, chi2inv, sqrtm, rand, randn

**Broader applications of these concepts: **Decision making under uncertainty, model discrimination, statistical methods, random variables, sampling

Tutorial |

** More Parameter Estimation (32 min)**

** ODE Parameter Estimation (45 min)**

Tutorial |