By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,898 Members | 2,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,898 IT Pros & Developers. It's quick & easy.

Help me to write a programme

P: n/a
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
Share this Question
Share on Google+
1 Reply


P: n/a
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.