LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

nonlinear curve fitting issue

Hi,

 

I am trying to do some non linear curve fitting (data attached).

 

I have been doing it quite successfully in the past using a similar structure, the only new thing now is my fitting function (Polarisation function . vi ), for which I get an error message when trying to wire it to f(x,a) in the Nonlinear Curve Fit.vi

 

i am not sure what the issue is really, first time I am facing it, maybe data type is wrong somewhere.

 

 

Kentmey
0 Kudos
Message 1 of 7
(2,904 Views)

Hi,

I think that you have forgotten to attach your file... 🙂

0 Kudos
Message 2 of 7
(2,890 Views)

Indeed...

Kentmey
0 Kudos
Message 3 of 7
(2,888 Views)

I don't know what was wrong (you disconnected some terminals in the subVI, so it did not work any more...I tried to reconnect them but the issue was not fixed, there was probably something else).

 

I retried the "procedure" from the beginning (from the template VI, as explained in function help). And now it seems to be OK.

 

 

0 Kudos
Message 4 of 7
(2,882 Views)

Cheers,

 

Any chance you got it to perform any decent fit ;)? It doesn't quite seem to fit properly (but that's a rather different issue)

Kentmey
0 Kudos
Message 5 of 7
(2,873 Views)

Yes indeed. I have noticed this bug while trying to run the VI... ^^

Anyway, you'll find it now ! 😉

0 Kudos
Message 6 of 7
(2,860 Views)

When I run the VI I get error -20041, singular matrix.

 

Looking at the detailed help, it specifies that the Initial parameters array must be the same length as the "a" array in the function VI. The Initial parameters array has six elements (Rohmic, Q, n, Rcharge, Td, Rd) while a has five elements (Eo, Rohm, b, m, n). They also need to be in the same order.

 

I am surprised the Spreadsheet String to Array function works with an empty format string.  An empty string is not a valid format specifier.  You should probably use %f as the format string.

 

Lynn

0 Kudos
Message 7 of 7
(2,856 Views)