Please provide matlab code! Thank you! 40 pts Problem 1 A reversible chemical re
ID: 3850368 • Letter: P
Question
Please provide matlab code! Thank you!
40 pts Problem 1 A reversible chemical reaction 2A B ->C 96 Can be characterized by the equilibrium relationship K (cc0 +x) (ca0-2*x) 2*(cbo-x)) Not necessarily valid MATLAB code x represents the number of moles of C produced cco is the initial concentration of C and equals4 cbo is the initial concentration of B and equals 28 ca0 is the initial concentration of A and equals 42 K is the equilibrium constant and in this case equals 0.016. Determine the concentration of x at equilibrium as defined by this equation using the following techiques 969% Part a 5 points Solve graphically. Your solution should be a graph appropriately annotated and you should add a comment here with your estimate of the solution (Think carefully about the bounds can concentration be negative?)Explanation / Answer
C)
Syntax
x = fzero(fun,x0)
x = fzero(fun,x0,options)
x = fzero(problem)
[x,fval,exitflag,output] = fzero(___)
Example
Calculate by finding the zero of the sine function near 3.
fun = @sin; % function
x0 = 3; % initial point
x = fzero(fun,x0)
x=3.1416
example 2 :
Find the zero of cosine between 1 and 2.
fun = @cos; % function
x0 = [1 2]; % initial interval
x = fzero(fun,x0)
x = 1.5708
example 3 :
Find the root of a function that has an extra parameter.
myfun = @(x,c) cos(c*x); % parameterized function
c = 2; % parameter
fun = @(x) myfun(x,c); % function of x alone
x = fzero(fun,0.1)
x = 0.7854
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.