Solving ODEs for chemical rate equations
Mostra commenti meno recenti
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 Commenti
Torsten
il 15 Nov 2022
Isn't your equation
dC_A/dt = -k*A
the equation for
rate = k*[A]
?
Oliver Wilson
il 15 Nov 2022
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Chemistry in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
