Skip to content

Instantly share code, notes, and snippets.

@gggritso
gggritso / Crank-Nicolson.m
Created December 4, 2011 18:15
Crank-Nicolson method for solving a simple diffusion/heat problem with time-dependence.
%% Startup
clc
clear all
close all
%% Definitions
% Axis
dx = 0.1;