LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

curve fit to sigmoid function Labview 7.1

Is it possible for me to fit XY data with a 3-parameter sigmoid function in Labview 7.1? I wish to automate the analysis of psychophysical data in LabView.

Many thanks for any pointers. If answering, please bear in mind that I am not mathematically sophisticated.

Rob
0 Kudos
Message 1 of 10
(8,348 Views)
Hi Rob,

I dont think that there is a specific function for sigmoid equations but you mmight be able to do it via the standard curve fitting vi's. For more info on these see the links bellow:

http://zone.ni.com/reference/en-XX/help/371361A-01/lvanlsconcepts/introduction_to_curve_fitting/

http://zone.ni.com/reference/en-XX/help/371361A-01/gmath/advanced_curve_fitting_vis/

Regards

Jon B
Applications Engineer
NIUK
0 Kudos
Message 2 of 10
(8,313 Views)
Do you have the exact function you need in mathematical form?
 
For example:  y(x) = A/(1+B exp(x)) + C
 
Can you attach a typical data set?
0 Kudos
Message 3 of 10
(8,311 Views)
Certainly.

The function I am trying to fit is:

y = a/1+e**-((x-b)/c)


A typical data set would be:

X: -80, -40, -20, -10, 0, 10, 20, 40, 80
Y: 0, 8, 43, 50, 70, 79, 77, 92, 100

Hope this helps.

Rob

0 Kudos
Message 4 of 10
(8,304 Views)
OK, I had a few minutes to adapt one of my old fitting VIs to your formula. It seems to work fine with your data. (LabVIEW 7.1)
 
With the above data, I get:
 
a =   +95.6279
b =   -13.0213
c =   +15.6574
Does this sound reasonable?
 
Attached is the VI and required subVIs. See if it makes sense to you. 🙂
 

Message Edited by altenbach on 03-02-2006 03:11 PM

Download All
Message 5 of 10
(8,299 Views)
This is wonderful - it does just what I require, giving exactly the parameter values I expect. Many thanks indeed. I shall now spend some time studying how your vi works.

Many thanks again. Problem solved (and, hopefully, some valuable programming lessons learned).

Rob
0 Kudos
Message 6 of 10
(8,281 Views)
hey thats a really nice VI. I just want one more additional thing from it. If i give a "x" value , from the fitted curve how can i get the "y" value? if someone can help me with this will be of great help.

Thank you.
0 Kudos
Message 7 of 10
(7,975 Views)

The model function calculates an array of y given an array of x values. Nothing prevents you from creating an array that has only one element. 😄

Just give it an array containing your desired "x" and the array of best fit paramters and it will calculate an array containing a single element. This is the "y" you want.

If you have LabVIEW 8.0 or later, I suggest to use the new "Nonlinear Curve Fit". It also calls the function by reference node but is more universal and has a few more bells an whistles. 😉

Message Edited by altenbach on 09-12-2007 08:46 AM

Message 8 of 10
(7,967 Views)

I want to fit kinetic functions (3-param sigmoid functions,...) in Profit6.11.1. I´m queen on producing the data on the bench but would be fine to feel comfortable to fit the data and deduce IC50, Km Kcat and so on.

 

 

So many thanks for some practice advices.

Ciara

 

 

0 Kudos
Message 9 of 10
(6,927 Views)

Hi , Thank u. This is such a nice example for Psychometric curve fitting. I was tring to reduce the X data points to 5 [1 2 3 4 5] and the Y data points from 0 to 1.0 (percentage). Can you help on this?

0 Kudos
Message 10 of 10
(4,647 Views)