Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

USE MATLAB TO WRITE CODE FOR THIS EXERCISE. THANKS A LOT! An irreversible, exoth

ID: 672172 • Letter: U

Question

USE MATLAB TO WRITE CODE FOR THIS EXERCISE. THANKS A LOT!

An irreversible, exothermic reaction taking place in a continuous stirred tank reactor (CSTR) is described by the coupled, non-linear, first order differential equation Obtain precise values (4 or 5 digits) of the steady state solution T_ss that are apparent in the plots from part a use those solutions to calculate the steady state concentiation C_ss Find 2 Times 2 Jacobian matrices for each of the three steady states that are present for D_alpha = 0.04 Find eigen values for each of the three 2 Times 2 matrices in part C

Explanation / Answer

To make MATLAB give an output, such as return the value of a variable, you type the name of the variable without any semi-colon (;) following the variable. In many cases, there is no need to see the value of a variable every single time MATLAB uses it. If MATLAB re-computes the value of a variable 1000 times, we probably don't want to see the result every single time. To surpress the output of a value, just add a semi-colon after the variable. Then MATLAB will perform the command, but will not show it on the screen.

ie:

------ie.2 solution ------

Let's say that we want the user to enter some value that we want the program to work with. This can be done using the input command with the syntax

variable=input('text');

This command will print out text on the screen and then wait for the user to enter a number. The variable will now be assigned the number that the user entered. (Using this command for reading letters instead of numbers is slightly more complicated and will not be covered in this tutorial.)

Now it is time for our first example. The following program asks the user for an amount in dollars, and returns the value of this amount in a foreign currency.

Example 1.

clear
exchange_rate = 0.5;
amount = input('Give amount in dollars: ');
amount_in_foreign_currency = exchange_rate*amount

Here in qustion solution :