LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error in nonlinear LM fit

Solved!
Go to solution

Hi

I didn't get what have you done 🙂 that works. Can you look at version corrected2 and tell me why it shows an error.

thanks

0 Kudos
Message 11 of 22
(952 Views)

Great ...

thanks a lot.

0 Kudos
Message 12 of 22
(952 Views)

weel, sorry to bother you again : I removed the column with 999, now the Guess parameter array has the correct size (5),... but again the error. Give it one more look please 🙂 thanks

(is there a ranking as NIGuru after Knight ? 🙂

0 Kudos
Message 13 of 22
(949 Views)

got it ..

sorry.. It is in the A0, A1 array

thanks

0 Kudos
Message 14 of 22
(947 Views)

I which version did you remove the extra column? My version assumes that there is that extra column and edits it out. Create an indicator on the initial guess array and see if the values are reasonable.

 

Now, you need to speed it up! Go back to the VI model!

0 Kudos
Message 15 of 22
(942 Views)

altenbach a écrit :

I which version did you remove the extra column? My version assumes that there is that extra column and edits it out. Create an indicator on the initial guess array and see if the values are reasonable.

 

Now, you need to speed it up! Go back to the VI model!


HI

I removed the 4th column inthe version corrected2 and it works great, albeit a bit slow. I will look at the vi model but I dont know how to edit that model to fit only the widths.

thanks

0 Kudos
Message 16 of 22
(937 Views)

 

Now, you need to speed it up! Go back to the VI model!


Hi

If there is no much trouble : can you modify your version of FewGaussians in which only widths are fitted together with a linear background ? (like in my formula example) ?

Or at least can you point me in a direction ? The coefficients amplitude and positions  are obtained at runtime and I don t see how can I write the reference to a model in which I need to pass some vairables.

thanks

0 Kudos
Message 17 of 22
(926 Views)

Sorry, I won't be near a computer for a while.

 

You can provide extra data to the model via the data variant input. Have a look at my examples. (Search for "practical nonlinear fitting", I can add the link later)

0 Kudos
Message 18 of 22
(917 Views)

Hi

I started again with the model vi and even by fitting everything (same data), it is about 3 times faster compared with the formula version. So, clearly it is worth investing some time in it 🙂

But I need to learn, and could not find by now, how to pass parameters at runtime :

-say I will fit a*exp(-bx) but keep a constant...

Thanks anyway

N

0 Kudos
Message 19 of 22
(913 Views)
Solution
Accepted by nitad54448

Have a look at the "advance model" here, it shows how each parameter can be selected for fitting or kept constant by using a boolean selector.

Message 20 of 22
(908 Views)