Getting error with the code in ode45 function
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
function dy = f(t,y)
y=[9,100];
D=0.00000001;
F=96485;
Z=0.000000016;
R=0.08206*298;
C=0.05;
J=-((D*Z*F*C)/R);
dy = J*y;
t=[0 5];
inity = 0;
[t,y]=ode45(@f, t, inity);
plot(t,y)
end
This is code for Nernst-Planck equation and when i execute it with Matlab-2020RA version it is showing error as, Out of memory. The likely cause is an infinite recursion within the program.
Error in f (line 12)
[t,y]=ode45(@f, t, inity);
So help me to correct the code
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!