LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i fit an exponential to a waveform?

I have a waveform that I want fitted with an exponential.  First of all, I'm having trouble trying to timeshift the waveform. I'm trying to do this by modifying the waveform attributes but this does not seem to be work.  Once I do that I need to convert the waveform into something that the exponential fitting function will accept.  Is there any easy way to do this? 
 
 
0 Kudos
Message 1 of 8
(4,230 Views)
It looks like the best way to approach this is to convert my waveform to (x,y) points, but I can't for the love of god figure out what kind of output that function is giving.  If I treat the output as an array of clusters it gives me an error saying that it is a cluster, and if I treat the output as a cluster of arrays, it gives me an error saying that it is a 1-D array.  What exactly is it? 
0 Kudos
Message 2 of 8
(4,217 Views)
Are the points equally spaced in x? Can you attach a small VI that contains your waveform as a diagram constant?
0 Kudos
Message 3 of 8
(4,214 Views)
Yes, they're equally spaced.  I attached an example of a waveform I want to fit.  The part I want to fit is the 2nd "section"
0 Kudos
Message 4 of 8
(4,212 Views)
After your graph contains data, right-click on it and select "Data operations...Make current values default". Save it and attach it again. Thanks!
0 Kudos
Message 5 of 8
(4,203 Views)
Ah, I was about to upload the fixed file just as I read your post 🙂
 
 
0 Kudos
Message 6 of 8
(4,202 Views)
Sorry, I no longer have LabVIEW 6.1. LabVIEW 7.0 and higher actually has an express VI for fitting, including single exponentials with offset.
 
The Nonlinear Lev-Mar fit contains your desired function by default, so you can use it "out-of-the-box". Just give it some reasonable initial estimates.
 
It seems to work fine. I have attached it as an image of the code and output graph. Just wire it up as shown. 😉
 

Message Edited by altenbach on 10-31-2005 04:59 PM

0 Kudos
Message 7 of 8
(4,195 Views)
Neat.  I'll try that out.  Thanks for the help!
0 Kudos
Message 8 of 8
(4,189 Views)