From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

newton raphson zero finder gives wrong results

Dear all,

 

I have to solve an equation containing the error function.. f(x)=u-exp(v*x^2)*erfc(w*x).. (u,v,w) are known variables.. Since LV doesnt know "erfc" I failed to use the implemented Newton Raphson function.. I found a post from Altenbach.. There he described a code to translate the Newton Raphson scheme in LV.. I transferred this to my problem and it seems to converge quite fast.. But it doesnt give the expected results compared to Matlab.. I used the Mathscript nodes but I have to solve this equation for a matrix of mios of entries and I would like to avoid i/o in the code..

 

Is there anyone able to debug the code? (Expected result for an input of 20 should be around 68..)

 

Any ideas to make it faster are well welcome and highly appreciated.

 

Sincerely

 

Philipp

0 Kudos
Message 1 of 1
(2,063 Views)