LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

errors in Y and X on non-linear fitting

Hi All,

 

I'm using nonlinear curve fitting vi (LM) and it works for parameters, howerver covariance matrix is not compatible with other softwares (ORIGIN, GNUPLOT) as I have Y and X variables errors on input data and really don't know how to enter with it in LabVIEW.

 

Regards,

Marcio

0 Kudos
Message 1 of 11
(3,952 Views)

Mr. Bottaro,

 

Can you give more details about your problem? Are you generating the data on LabVIEW and using on the other software(ORIGIN,GNUPLOT) or generating the data on the others software and using 

on LabVIEW?

 

Best Regards,

 

César Teixeira

César Teixeira
Certified LabVIEW Developer - CLD
Applications Engineering
National Instruments Brazil


0 Kudos
Message 2 of 11
(3,863 Views)

Hello, I think the OP would like something like this:

 

http://forums.ni.com/t5/LabVIEW-Idea-Exchange/Nonlinear-Curve-Fit-VI-with-error-input-and-output/idi...

 

Edit1:

Once I also needed this feature, I looked at LabVIEW, no. I checked my Numerical Recepies C functions, no. I ended up doing "manual" calcs using Origin (which I really hate, the worst soft ever in my opinion)---

 

edit2: If i understood well, the "Weight" input array might define the uncertainity of the values in the Y input array. But I am not really sure if this is exactly correct?

http://forums.ni.com/t5/LabVIEW/nonlinear-curve-fitting-how-to-get-the-parameter-standard/m-p/149032...

" weight=(1/std. dev.)^2  "  ???

 

Edit3: I strongly beleive, LabVIEW has still PLANTY of room to improve in fitting functions. I wonder what is the reason why LV still not able to provide algorithms what many other products can do...?

0 Kudos
Message 3 of 11
(3,841 Views)

Error in both X and Y is not supported in LV. Check my comment in this thread.

While it appears relatively straightforward to implement the Numerical Recipe approach for a linear function, it is less trivial to do so for a general non-linear function.

Slightly out of topic but in answer to the previous comment, Origin has improved significantly in terms of stability notably.

LV doesn't even compare in terms of data analysis and representation.

The good news is that it is very easy to export data directly from LabVIEW to Origin.

Message 4 of 11
(3,823 Views)

Ok, I have experience with Origin dated back many years ago, just to be fair, so no idea how it works nowadays. Good to know they improved! 🙂

Actually I have found something I did not know about:

http://www.originlab.com/doc/LabVIEW

Interesting...

 

0 Kudos
Message 5 of 11
(3,812 Views)

" weight=(1/std. dev.)^2  " 

 

I know this is true, but you should normalize it such that the sum is equal to 1; that is, sum all the values first and then divide by this value. This only matters when using the "Goodness of Fit" vi. The output parameters are not correct when the weights do not add to unity.

 

Lastly, LabVIEW has no method of inputting x-errors natively, only y-errors. Typically these errors are small, but it would be nice to have this feature.

 

I strongly beleive, LabVIEW has still PLANTY of room to improve in fitting functions. I wonder what is the reason why LV still not able to provide algorithms what many other products can do...?

 

Agree wholeheartedly!!

 

Cheers,

mcduff

0 Kudos
Message 6 of 11
(3,802 Views)

Dear Teixeira, I'm not sharing data within softwares, only using Gnu and Origin as references to validate process. Those software alow me to input X and Y errors, LabView unfotunately not.

 

Thank you.

Marcio

0 Kudos
Message 7 of 11
(3,742 Views)

Dear Mr. Bottaro,

 

Can you share the code with me?

I will take a look and try to undestand what is happening.

 

Best regards,

 

César Teixeira

César Teixeira
Certified LabVIEW Developer - CLD
Applications Engineering
National Instruments Brazil


0 Kudos
Message 8 of 11
(3,697 Views)
Why would you need to see his code? I think the story is very simple: the OP wanted to use x and y errors as inputs for the fitting vi. This feature is not implemented in those VIs, as it was discussed above. So why do you need to "see what is happening"?
0 Kudos
Message 9 of 11
(3,686 Views)

Dear Teixeira, there's no code, I only would like to know how to enter x and y errors for data fitting, then I'll work in the code! The choise until now is to share data with other software. I have a table (2D array) with x, xerrors, y and y errors.

 

Is there an integrated or gateway for GNUPLOT you know? Than I do not need to make separate operations and would integrate process.

 

Thanks,

Marcio

0 Kudos
Message 10 of 11
(3,656 Views)