How Can I Code the Rate of Reaction in MATLAB?

  • Context: MATLAB 
  • Thread starter Thread starter sameer990
  • Start date Start date
  • Tags Tags
    Matlab Rate Reaction
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
3 replies · 2K views
sameer990
Messages
2
Reaction score
0
Can Anybody help to code this in matlab

A->B --- A is Sbbstrate here and B is Product
Y[/a]=stiochimetric
Initial values are A[0] and B[0]
Q= reaction quotient

R=active if Q<k ----- R is reaction
R=Stops if Q=k
t=? ------ t is the time

d[A][/dt]= -kA Conc_A(t,A[0],K) and it return A
A=A[0] e[-k][t-t[0]]

And for B
ΔB = YΔA
ΔB=B-B[0] = (A[0]-A)Y Conc_B (B[0],Y,A[0],A) gets A and Return B
B=B[0] + (A[0]-A)Y

t=[0.001 0.002 0.003... 1ms ]

A=Conc_A(t)
B=Conc_B(t)

Plot(t,A,B)
 
Physics news on Phys.org
Please do reply ?
 
look up RK45
 
I think the Matlab command is ode45 for an RK4-type algorithm.