LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Exponential Curve fit

Solved!
Go to solution

Hi,

 

I am trying curve Fitting in Labview. The equation which I am using is y=a*exp(b^x).

I have only two co-ordinates and while using exponential fit.vi it fits d curve same as a linear fit.

Any help would be greatly appreciated.

 

Please find the attached vi and expected graph below

 

Thanks in advance

 

Download All
0 Kudos
Message 1 of 6
(3,869 Views)

You only plot two points. To generate more points, generate a x-ramp with reasonable range and resolution and generate y data based on the best fit parameters.

0 Kudos
Message 2 of 6
(3,866 Views)
Solution
Accepted by Naseemvp777

Here's one way to do it.

 

expf.png

Message 3 of 6
(3,856 Views)

Thanks a lot for the solution 🙂

0 Kudos
Message 4 of 6
(3,803 Views)

Since you did not fit for the offset, I left it out for simplicity. For a more universal solution you might want to also add the offset when generating the simulated data, even though it is zero in this case. (Fewer changes needed if you ever need to include an offset in the future).

 

Also note that you can easily make the range for the simulation wider (e.g. 190...260) for a less cramped look.

0 Kudos
Message 5 of 6
(3,793 Views)

Thanks a lot for the Suggestion. Will take care of Offset.

0 Kudos
Message 6 of 6
(3,751 Views)