Question: This code shows how CHEBFUN can be used with MATLAB ODE45 to give a symbolic look to your answer. The presence of the calling argument

This code shows how CHEBFUN can be used with MATLAB ODE45 to give a "symbolic" look to your answer. The presence of the calling argument domain in the calling statement creates a Chebyshev polynomial for the results.


% consecutive reaction using ODE45 and CHEBFUN % A > B >


Note that additional operations on the results such as finding the maximum values etc. have become rather easier with this approach.
The maximum value of \(B\) is 0.25 and occurs at time 0.6931 for the parameters used in the example. These match the exact values from the analytical model.

% consecutive reaction using ODE45 and CHEBFUN % A > B > C fun = k1 1.0; k2 = 2.0; = @(t,v) [-k1*v (1); k1*v (1) -k2*v (2)]; v = ode45 (fun, domain (0,3), [1 0]); % solves plot (v) % generates the plot c_max = max (v(:,2)) % finds what the maximum value is. diff( v(:,2)) % takes the derivative F = roots (F) % finds where the maximum occurs

Step by Step Solution

3.43 Rating (150 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Chemical Engineering Questions!