LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems with the Newton-Raphson algorithm?

In evaluating the N-R algorithm in LabView, I've happened upon an unfavorable result. I eventually worked down to a simple linear expression and the N-R algorithm still failed to yeild results for a wide range of initial guesses. For any initial guess, the next iteration generated by the N-R algorithm should yeild the root. Yet the NI algorithm failed to converge? I'm a bit hesitant to trust the numerics available in LV, and I guess this reinforces that suspission. Are these types of errors encountered elsewhere?
0 Kudos
Message 1 of 2
(2,594 Views)
You seem to confuse the meaning of the inputs.

"start" is NOT an "initial guess" but the lower boundary of the search interval. You should also wire the "end", which designates the upper boundary of the search interval.

In your case, you apparently use start=4 and end=1 (unwired default), while the result is .666, thus outside your search interval.

Set e.g. (start=0, end=1) or (start=-1000, end=1000) and it'll work just fine.
0 Kudos
Message 2 of 2
(2,594 Views)