This is pdfTeX, Version 3.1415926-1.40.10 (MiKTeX 2.8) (preloaded format=latex 2010.5.6) 3 NOV 2011 17:25 entering extended mode **runge.m (F:\CS_2011\INTERPOLAZIONE_MATLAB_2011\runge.m LaTeX2e <2009/09/24> Babel and hyphenation patterns for english, dumylang, nohyphenation, ge rman, ngerman, german-x-2009-06-19, ngerman-x-2009-06-19, french, loaded. ! LaTeX Error: Missing \begin{document}. See the LaTeX manual or LaTeX Companion for explanation. Type H for immediate help. ... l.1 f unction [fx]=runge(x) You're in trouble here. Try typing to proceed. If that doesn't work, type X to quit. Missing character: There is no f in font nullfont! Missing character: There is no u in font nullfont! Missing character: There is no n in font nullfont! Missing character: There is no c in font nullfont! Missing character: There is no t in font nullfont! Missing character: There is no i in font nullfont! Missing character: There is no o in font nullfont! Missing character: There is no n in font nullfont! Missing character: There is no [ in font nullfont! Missing character: There is no f in font nullfont! Missing character: There is no x in font nullfont! Missing character: There is no ] in font nullfont! Missing character: There is no = in font nullfont! Missing character: There is no r in font nullfont! Missing character: There is no u in font nullfont! Missing character: There is no n in font nullfont! Missing character: There is no g in font nullfont! Missing character: There is no e in font nullfont! Missing character: There is no ( in font nullfont! Missing character: There is no x in font nullfont! Missing character: There is no ) in font nullfont! Missing character: There is no f in font nullfont! Missing character: There is no x in font nullfont! Missing character: There is no = in font nullfont! Missing character: There is no 1 in font nullfont! Missing character: There is no . in font nullfont! Missing character: There is no / in font nullfont! Missing character: There is no ( in font nullfont! Missing character: There is no x in font nullfont! Missing character: There is no . in font nullfont! ! Missing $ inserted. $ l.2 fx=1./(x.^ 2+1); I've inserted a begin-math/end-math symbol since I think you left one out. Proceed, with fingers crossed. LaTeX Font Info: External font `cmex10' loaded for size (Font) <7> on input line 2. LaTeX Font Info: External font `cmex10' loaded for size (Font) <5> on input line 2. ) ! Emergency stop. <*> runge.m *** (job aborted, no legal \end found) Here is how much of TeX's memory you used: 10 strings out of 495286 217 string characters out of 3179036 45037 words of memory out of 3000000 3308 multiletter control sequences out of 15000+200000 3640 words of font info for 14 fonts, out of 3000000 for 9000 14 hyphenation exceptions out of 8191 18i,1n,12p,41b,56s stack positions out of 5000i,500n,10000p,200000b,50000s No pages of output.