LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use curve fit Labview 8.0

Hello,

 

 

I`m  trying to fit  a curve like a*exp(-b*x)+c to some data,  by using the Curve Fit function in LabVIEW 8.0 (Mathematics -> Fitting-> Curve Fit). But, unlike other fitting routines, this one doesn`t accept arrays as inputs, so it converts them to Dynamic Data and every time a try to run the program I always end up with this error message:

 

An exception occurred within the external code called by a Call Library Function Node. This might have corrupted LabVIEW`s memory. Save any work to a new location and restart LabVIEW.

VI "test.vi" was stopped at node 0x0 of subVI "NI_AALPro.lvlib:Real SVD Decomposition.vi"

 

After this, I save the file to another folder and restart LabVIEW but the error still persists... I probed the Dynamic Data generated and it seems OK.... any ideas?

 

 

Thanks in advance,

 

Diogo

0 Kudos
Message 1 of 3
(3,673 Views)
  • You need to wire an array to the parameter output.
  • You should make the B estimate negative, else the fit will probably fail.
  • When you calculate the data, you are using the wrong exponential function (exp(arg)-1 (!!!) instead of exp(arg)).

 

Attached is a quick rewrite to get you started.

Message Edited by altenbach on 09-09-2008 09:40 AM
Message 2 of 3
(3,653 Views)
Altenbach,
thanks for your help; but part of the problem seems to be the software on the PC I was working: when I tried the .vi at home, the error displayed was not the one I wrote in my post, it simply said that no optimal solution could be found, because (as you wrote on yours) the initial B should be negative. When I changed this, it worked. Sometimes, on that  PC, I can't access to the Curve Fit Properties, a message just pops-up : unable to show Properties and I have to erase it and place a Curve Fit block again.
Diogo
0 Kudos
Message 3 of 3
(3,632 Views)