Download presentation
Presentation is loading. Please wait.
Published byValerie Harrington Modified over 9 years ago
1
Matlab Experiment of Holliday Junction Kenny and Ryan
2
Matlab Function % ODE's for holiday junctions, A, B, C, E %where A-B and C-E are much slower than B-C function dydt = HolJunct(t,y) k1f=.0000001; % A to B rate k2f=.032; % B to C rate k3f=2.2*(10^-8); % C to E rate k1r=2.8*(10^-8); % B to A rate k2r=.042; % C to B rate dydt(1,1)=-k1f*y(1)+k1r*y(2); % dA/dt dydt(2,1)=-k1r*y(2)+k1f*y(1)-k2f*y(2)+k2r*y(3); % dB/dt dydt(3,1)=k2f*y(2)-k2r*y(3)-k3f*y(3); % dC/dt dydt(4,1)=k3f*y(3); % dE/dt end
3
Matlab Function Explanation The function is given a title with the return value of dydt The reaction constants, k 1 r, k 1 f, etc are initialized at the top The 4 dimension differential equation system is represented using dydt(1,1) dydt(4,1), where (1,1) represents the first row and first column of a matrix we call dydt. The matrix dydt is thus a column vector (4 x 1) – (rows x columns) that consists of the 4 differential equations dA/dt dE/dt
4
Solving the System Now that the system has been created in the function title HolJunct, we need to call and solve it within the Matlab Command Window (the function is created in a script file) We solve/call using the command [t,y] = ode23(@HolJunct, [0,2000000], [0 1 0.95 0]); The above ode23 is a built-in Matlab function that solves Ordinary Differential Equations (ODE), where the function being used needs to be defined (@), the time span or interval needs to be set ([0 to 2million]), and the initial conditions for the original functions A,B,C,E need to be inputted ([0 for A, 1 for B, 0.95 for C, 0 for E]) Type help ode23 for more information
5
Output/Results After typing the command for different initial conditions, the following graphs were obtained: A – B – C – E – Note the ratio between B and C remains constant since this represents short term
6
Results Continued After changing k3f and k1r to larger numbers, we can see a “sped- up” version of the reaction A – B – C – E –
7
END
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.