You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
Solve, and then plot, the solution of the nonlinear diffusion equation
u_t = Du_xx + f(x,t,u,u_x) for xL < x < xR, 0 < t < T
where
BCs: a0*u(xL,t) + b0*u_x(xL,t) = c0
a1*u(xR,t) + b1*u_x(xR,t) = c1
IC: u(x,0)=g(x)
The algorithm uses the Crank-Nicolson method with a uniform grid. With this, Newton's method is used to solve the resulting nonlinear system. Overall it is relatively fast. For example, for Fischer's equation, it solves the problem in about 0.02 sec on an iMac (and it takes about 0.4 sec when nx=nt=1000).
Cite As
Mark Holmes (2026). nde.m (https://nl.mathworks.com/matlabcentral/fileexchange/65481-nde-m), MATLAB Central File Exchange. Retrieved .
General Information
- Version 1.5.0.0 (209 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux
