468,736 Members | 2,093 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,736 developers. It's quick & easy.

Help me to write a programme

Help me to write a programme to solve mannings equation using
Newton-Raphson method.

Newton-Raphoson metod=
X^(m+1)= X^m - f(x^m)/[df(x^m)/dx]

mannings equation = V= (1/n)*r^(2/3)*s^(1/2)

Jul 23 '05 #1
1 2685
Dumidu wrote:
Help me to write a programme to solve mannings equation using
Newton-Raphson method.

Newton-Raphoson metod=
X^(m+1)= X^m - f(x^m)/[df(x^m)/dx]

mannings equation = V= (1/n)*r^(2/3)*s^(1/2)


Try searching the web, I'm sure there are plenty of
examples out there.

I'll assume double as the numeric base.

double V(double n, double r, double s)
{
return (1.0/n) * pow(r, 2.0/3.0) * pow(s, 0.5);
}

I leave the other equation for the O.P.
--
Thomas Matthews

C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.comeaucomputing.com/learn/faq/
Other sites:
http://www.josuttis.com -- C++ STL Library book
http://www.sgi.com/tech/stl -- Standard Template Library

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Wayne's World | last post: by
2 posts views Thread by Mark Delon | last post: by
5 posts views Thread by Tyana05 | last post: by
2 posts views Thread by garyusenet | last post: by
reply views Thread by thinboy | last post: by
1 post views Thread by Kennington23 | last post: by
reply views Thread by zhoujie | last post: by
xarzu
2 posts views Thread by xarzu | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.