See Matlab/TextExamples/chap10 for adiatbatic flash