MATLAB >> root separation method in flood analysis

by xyzmis » Wed, 15 Apr 2009 18:52:49 GMT

Hi

i found this article
http://www.hydrol-earth-syst-sci.net/7/151/2003/hess-7-151-2003.html
http://www.hydrol-earth-syst-sci.net/7/151/2003/hess-7-151-2003.pdf
and i want to implement this in matlab

is there someone who fully understand this article?
i need to talk wit him/her :-)

with regards
Piotrek

Similar Threads

1. Root finding for multiple roots with bisection method - MATLAB

2. Newton's method for finding roots and evaluating polynomials with Horner

Hi!

I have to evaluate x^3-x^2-x-1=0 and its 1rst derivative using Horner's method and then I have to find the remaining roots of the polynomial. 
I made 3 codes. One for Newton, the 2nd for Horner and the 3rd is the main one. They are not working and I don't know what else can I do. If someone can help I'll appreciate it a lot!
Here are the codes.
Thanks in advance!
Glomar



function [pval,pp]=hornerV(a,z)
n=length(a);
pval=a(n)*ones(size(z));
pp=pval;
for k=n-1:-1:2
    pval=a(k)+z.*pval;
    pp=pval+z.*pp;
end
pval=a(1)+z.*pval;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

function y=newtonf(y,yp,x0)

if nargin<4
   tol=1.0e-4;
end
if nargin<5
   itermax=20;
end
x=x0;
normx=0;
normz=inf;
iter=0;
while (normz>tol*normx)&(iter<=itermax)
    [fp,fp0]=feval(f,x);
    z=-fp0\f0;
    normz=norm(z,2);
    normx=norm(x,2);
    x=x+z;
    iter=iter+1;
end


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function y=polynomial(x0)
coef=[-1 -1 -1 1];
x0=linspace(-5,5,100);
[y,yp]=hornerV(coef,x0);
plot(x0,y,x0,yp);legend y yp;grid on

3. Newton's method for finding roots and evaluating polynomials with - MATLAB

4. Newton's method, multiple roots

I am trying to write a newtons method program that will find multiple
roots. The function is a tan function and I am trying to find the
first 10 roots. how do i loop the newton program to find the next
root?

5. using root locus method using matlab platform - MATLAB

6. complex root search method

Hi
I have a very complicated function which is a combination of different
bessels functions. I like to find all the real and complex roots of
this function. I need a robust algorithm to calculate these roots
accurately. I appreciate if somebody could help me.
thanks
shahraam

7. find roots of a nonlinear equation before using bisection method - MATLAB

8. muller method for root finding

Hi!

I need an implimentation of the muller method for finding N roots of an
arbitrary
complex function with defaltion. So that if a few roots have been
found, they
are excuded from the search.

I shall be thankful to you !!

Regards
mintoo