Solving ODEs for chemical rate equations
Show older comments
I am trying to model a chemical equation of the form rate = k [a]^1 *[b]^-1. I have managed witht the help of some you tube resources to model a an equation for one reactant but am unsure of how to include the second. Here is the code i have got so far and any help would be appreciated.
clear all
close all
clc
K = 0.06;
timespan = [0 30]';
A0 = 0.5;
first = @(t,A) -K*A
[t,A_calc] = ode45(first,timespan,A0)
plot(t,A_calc, 'o','Linewidth',1,'Markersize',10)
2 Comments
Torsten
on 15 Nov 2022
Isn't your equation
dC_A/dt = -k*A
the equation for
rate = k*[A]
?
Oliver Wilson
on 15 Nov 2022
Accepted Answer
More Answers (0)
Categories
Find more on Chemistry in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!