I post here the Levenberg–Marquardt algorithms and Powell's dog leg method algorithms for fitting various functions such as sinus, cosinus, Gauss function with amplitude, Gauss function with area, Lorentz function with area and Voigt function. All m-scripts posted here are thoroughly explained at MathWorks FileExchange under my name Karol Vegso.