Showing results for 
Search instead for 
Did you mean: 

Lorentzian Curve fitting


I have a LabView vi. that downloads the trace signals from a Spectrum Analyzer, and I am trying to do a Lorentzian curve fitting to the result. Does the LabView 7.1 have any vi.'s that serves this purpose? Looks like it only has a linear, polynomial, and exponential fittings available. Would I have to use another program to do this task?

Thank you,
0 Kudos
Message 1 of 4
You need to use Levenberg-Marquardt.

Is you signal a single lorentzian or multiple Lorentzian lines?

If you do a forum search for levenberg marquardt, you'll find a few examples htat Ihave posted dealing with significantly more complex problems. It should be easy to adapt one of them for your problem.
0 Kudos
Message 2 of 4
Actually, I just found a simple demo I made in 2003 that simulates fitting of a single Loretzian or Gaussian line (selectable) using modified Lev-Mar VIs.

It's a bit stale, but should get you going in the right direction. 🙂

Let me know if you have any questions.
Message 3 of 4


I've tried to input my own data into this code and kept getting an error. I have a simple Cluster which consists of X and Y data

Please see vi attached.


Any ideas?


Also, I'd think my spectrum peaks are mixed Gaussian Lorentzian.  Is there a way I can combine the two formulae as a percentage mix?



0 Kudos
Message 4 of 4