LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

NonLinearFitWithMaxIters: iterations, parameter ranges and correlations

I'm using NonLinearFitWithMaxIters but I'd like to be able to limit ranges within which fit parameters can change, I'd like to know the current iteration during the fitting, and I'd like to get correlation matrices between fit parameters. Can you tell me how any of these can be done?
0 Kudos
Message 1 of 4
(3,075 Views)
Hi,

As you can tell, using NonLinearFitWithMaxIters does not necessarily allow you to find any of those things that you are looking for. It seems as though you are looking for a function that in the end performs the same, but provides these details along the way. We don't have a function available to do this that comes with CVI, but you are more than welcome to create your own version of this function. The formula used to calculate the output is shown in the context help, and from there you should be able to derive your own version of this and expose the requested parameters. Like for instance, to get the iteration, it's possible this new function you define can be called multiple times in a loop and passed parameters everytime. Then, if you have some integer
value that maintains the number of times the function has been called, you will have the iteration. This is one example of something you may try. In any case, however, you are looking for functionality that is very specific to your application.

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 2 of 4
(3,075 Views)
Unfortunately, it's not as easy as programming the formula from the context help. The formula is only for the mse, the actual Lev Mar algorithm is much more complicated. The information I ask for should be available somewhere while the CVI function is executed and all the things I asked about are pretty standard when doing fitting, so I don't quite understand why NI went through the trouble of writing the function but not including these inputs/outputs. As it stands, the NonLinearFitWithMaxIters function has very limited use.
0 Kudos
Message 3 of 4
(3,075 Views)
I agree with you regarding the limited capabilities of the function, and it may be in your best interest at this point to file a product suggestion with our R%D department. To do this, go to www.ni.com, and click on the Contact NI link. At the next page, click on the product feedback link and enter your suggestion. Thanks!

Jeremy L.
National Instruments
Jeremy L.
National Instruments
0 Kudos
Message 4 of 4
(3,075 Views)