Graphing an nonlinear ODE

2 vues (au cours des 30 derniers jours)
Nasir Holliday
Nasir Holliday le 4 Mar 2020
Commenté : Dinesh Yadav le 9 Mar 2020
I have the following code:
%Electroporation Project
sym vars
D=5E-14; %diffusion coefficient for pore radius
kB=1.38E-23; %boltzmann constant
T=310; %temperature
F=0.70E-9; %max electric force
rh = 0.97E-9; %velocity constant
rt = 0.31E-9; %velocity constant
B=1.4E-19; %steric repulsion energy (beta)
rs = 0.51E-9; %minimum radius of hydrophilic pores (r star)
g=1.8E-11; %edge energy (gamma)
s=-1E-4; %sigmaeff
V = 0.3; %solving ODE for these values for both r1 and r2
rj=[-5:5]; %hypothetical range to determine fixed points
drdt=(D/(kB*T))*((V^2*F)*(rj+rt)./(1+rh)+4*B*(rs./rj).^4*(1/rj)-2*pi*g+2*pi*s*rj);
My issue is that I have to plot(rj,drdt), but I cannot seem to figure out how to get the matrix dimensions to agree!! Can someone please tell me where I should put the '.' so the matrix dimensions are equal.
I keep getting the following message and I have tried so many different combinations.
Error using /
Matrix dimensions must agree.
  1 commentaire
Dinesh Yadav
Dinesh Yadav le 9 Mar 2020
Can you show the actual equation for dr/dt ?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by