LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

exponential fit from equation then find slope?

my first question is is this even possible?

basically i need labview to do what is done in the attached image of kaleidagraph. given a set of data points entered, plot them, then plot exponential the line of best fit by using the equation seen in the attached image, and extract m1 and m2

the attached vi is what i have so far. this is my first experience with graphing. i kind of have an idea how to use Exponential Fit.vi, but have no idea how to use the curve fitting. Exponential Fit.vi though doesn't allow you to enter in your own equation format. and for both, i don't see where you could extract a slopes. any ideas?
Download All
0 Kudos
Message 1 of 4
(2,994 Views)
The regular exponential fit won't really work for you as is since it's using y=ae^bx and your formula is more complicated. The custom curve fit that you set up will work, you just need to use some dynamic data conversions. Also, you don't need to to all that complicated stuff to get your X and Y values from your cluster. Just use auto-indexing. Not sure what the point of the boolean was, so I ignored it. See attached VI. Since you did not have any data to plot I just generated some dummy data.
Message 2 of 4
(2,978 Views)
that's for the vi. the boolean is something i will implement later on. i have a few questions though to help me understand...

1. what exactly is a "ramp pattern"? i've never seen that used before. what exactly goes on in that for loop?
2. how did you determine the values of m1 and m2? just initial guesses?
3. why was the rand()/35 added to the end?
4. what is the waveform display? what is it suppose to do/show?
//EDIT: 5. why is it everytime i run it i get different m1/m2 values? it's suppose to stay constant for each constant set of data

sorry for the questions. i'm just trying to learn to understand it

Message Edited by unknown00 on 07-10-2007 02:26 PM

0 Kudos
Message 3 of 4
(2,973 Views)
To answer your questions:

1. You did not have any data with your VI. The array of clusters was empty, so I had to generate my own data. The ramp pattern just generates the X values. It's in the Signal Generation palette. The loop uses a formula node to generate the y values using your equation. In the upper left of the VI is the unbundling of your data, if you had any. As I had indicated, you don't need to do all that stuff you were doing. If you have values in your array of clusters just use the two outputs of the for-loop (which I wired to the X2 and Y2 array indicators) as the X and Y values that I'm generating manually.
2. I just used the m1/m2 values from one of your curves in the picture. Again, I needed to generate data.
3. That was just to give the data some jitter so that curve fitting could be distinguished from the raw X and Y values.
4. The waveform displays the generated data and the curve fit. Not sure what you're asking here.


Message 4 of 4
(2,965 Views)