Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- close all
- clc
- clear all
- eqn1 = 'DR == a*J';
- eqn2 = 'DJ == b*R';
- inits = 'R(0) = 0.5, J(0) = 0.5';
- solv = dsolve(eqn1,eqn2,inits,'t');
- t = linspace(0,100,1e4);
- a = 0.2;
- b = 0.4;
- R = eval(vectorize(solv.R));
- J = eval(vectorize(solv.J));
- figure(1)
- plot(t,R,'b');
- hold on
- plot(t,J,'r');
- grid on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement