本文介绍了C#Newton Raphson的帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以这是我的代码





  double  a =  1 ,Lspan =  30 ,Lcable =  33 ,fn,fdn,dfn; 








{
fn =(( 2 * a)*(Math.Sinh(Lspan /( 2 * a)))) - Lcable;

fdn =( 2 *(Math.Sinh(Lspan /( 2 * a))) - (((Lspan /( 2 * a))*(Math.Cosh(Lspan /( 2 * a))))));

dfn =(fn)/(fdn);

a + = -dfn;

}
while (dfn > 0 0000000000000000000000001 );





Console.WriteLine( {0},a);
Console.ReadKey();





我正在尝试使用newton raphsons方法来查找a的值,起始值是1,结束值应该是19。*****而不是1。******有没有人知道如何解决这个问题,它让我发疯了!

解决方案

So this is my code


double a = 1, Lspan = 30, Lcable = 33, fn, fdn,dfn  ;

          





            do
            {
                fn = ((2 * a) * (Math.Sinh(Lspan / (2 * a)))) - Lcable;

                fdn = (2 * (Math.Sinh(Lspan / (2 * a))) - (((Lspan / (2 * a)) * (Math.Cosh(Lspan / (2 * a))))));

                dfn = (fn) / (fdn);

                a += -dfn;

            }
            while (dfn > 0.0000000000000000000000001);





            Console.WriteLine( " {0} ",a) ;
            Console.ReadKey();



I am trying to do newton raphsons method to find a value for a, the starting value is 1 and the end value should be 19.***** instead it is 1.****** does anyone know how to fix this, its driving me mad!!

解决方案


这篇关于C#Newton Raphson的帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 03:35