View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from

4.1 | 58 ratings Rate this file 44 Downloads (last 30 days) File Size: 1.34 KB File ID: #4313 Version: 1.0




29 Dec 2003 (Updated )

Newton-Raphson method for all real roots of the polynomial.

Editor's Notes:

Popular File 2010

| Watch this File

File Information

This M-file calculates all the real roots of the given polynomial. It calls syn_division, a synthetic division function, and derivate, differentiation function.

MATLAB release MATLAB 5.3 (R11)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (84)
06 Dec 2016 farid Sulaiman

16 Aug 2016 Alok Verma

28 Apr 2016 lugenfeng

20 Apr 2014 jin

jin (view profile)

17 Apr 2012 Tannistha

nice script

11 Mar 2012 Halit

Halit (view profile)

30 Nov 2011 jemo

jemo (view profile)

12 Oct 2011 Emre

Emre (view profile)

gives error
??? Input argument "coeff_function" is undefined.

Error in ==> syn_division at 6

Comment only
10 Jun 2011 bulmbju hkb


Comment only
12 Apr 2011 mohd izzat mustaffa

i need help to find root for certain function f(x)=0.5*x^3-4*x^2+6*x-2 with initial guess of 4.2..can help me?
thanks...using newton raphson method

Comment only
03 Feb 2011 Chiara

Chiara (view profile)

I need a help to find the solution for an expression with 3 parameters.

Comment only
21 Nov 2010 Juan Camilo Medina

There exist a build in function to compute the roots of polynomial in Matlab already (type help roots). What if you want to do another nonlinear function and not a polynomial?

02 Nov 2010 Harsha Vardhan

12 Oct 2010 hefei anhui

thank you very much

Comment only
20 Sep 2010 Kolade Olanipekun

Please I need a Matlab code to iterate this function urgently
Det (I - H*Bdiag(f+g)B')= 0 ; where I=Identity matrix, H=3 by 3 matrix,B=3 by 2 matrix,B'=B transpose while (f+g) is 2by 2 matrix.


Comment only
18 Mar 2010 Yong Wang


30 Nov 2009 Andrew staines

excellent software for the 1 parameter case, I needed it for 2... any ideas?

Comment only
17 May 2009 Darren Rowland

This functionality is already implemented in Matlab, in the function roots. This is a poor attempt to achieve the same result

17 Nov 2008 Sushma Lanke

do you by any chance have matlab codes to solve the following system of equations using newton raphson method, etc :

f(x) = 63X^5 - 70 X^3+ 15x
please kindly forward us the codes if it is possible.

17 Nov 2008 Sushma Lanke

05 Oct 2008 ek cha

02 Sep 2008 jose luis

01 Sep 2008 raj roshan dhruw


Comment only
01 Sep 2008 raj roshan dhruw


Comment only
29 Aug 2008 derya sahin

28 Aug 2008 yuan feng

a good way to solve equations

Comment only
15 Aug 2008 raj roshan dhruw

13 Jun 2008 ivan ivic

29 May 2008 svetlana sejas


Comment only
01 May 2008 Izzie Lee

29 Apr 2008 Jing Gao

28 Apr 2008 nick whirsman

11 Apr 2008 mlago fateh

héros de berber

Comment only
09 Apr 2008 Andoni Lizaso

21 Mar 2008 EDWIN MORENO

i need what is the method,

15 Mar 2008 Yi Cao

find polynomial roots through polynomial evaluation is not numerically stable. For example, consider the polynomial which has roots at 1,2,3,4,5,6,7,8,9,10,11,12. The coefficients of this polynomial can be obtained by c=poly(1:12); then test this code:


It can only detect roots 1:9, not 10, 11, and 12.

MATLAB already has function, roots to find all roots of a polynomial. It calculates the eigenvalues of the companion matrix of the polynomial, hence is stable. Therefore, there is no any reason one should use this code.

18 Feb 2008 tien quach

12 Feb 2008 Sohail iqbal

Works perfectly!

22 Jan 2008 enes yigitbas

good work. thanks a lot...

25 Sep 2007 Jimmy Banker

it always say error

Error in ==> syn_division at 6

Comment only
17 Sep 2007 Mihon Honda

Very interesting!! Your algorithm is clean and worthy!
Is there a reason why do you create a m file derivate? Can't u just use the polyder function? Or are there limitations?

15 Sep 2007 shiran jaya

hi every one .. plz help me to develop my matlab knowledge. also i am a beginner for
matlab and it is pleaser to me joining with you.
tanks .....

08 Sep 2007 john kan

19 Aug 2007 Sanjay Malakar

08 Aug 2007 ooi heng

can u let me know how to use, when i simulate got error, URGENT!

Comment only
07 Aug 2007 adrian pramanta

13 Jul 2007 ddt tio

goood code

28 Jun 2007 Qu Suhan

very useful!

02 May 2007 eeee weew

ewthays good

Comment only
22 Apr 2007 chiali lotfi

its butiful

Comment only
11 Apr 2007 thamer hamad

thank you

19 Mar 2007 Eric Bowman

very helpful, thank you

15 Mar 2007 prithvi gopinath

great work.. thanks a lot. i need an example of m-r method in matlab to solve power system analysis problems.
thank you

03 Mar 2007 Haomin Zhang

Thank you for your work

01 Mar 2007 jeua jea


23 Feb 2007 Hans Andrew

Very Useful in Power Flow Analysis, i hope i can have it. Thank you very much.

22 Feb 2007 youcef brik


Comment only
14 Feb 2007 Ricky Wong

To:levent simsek example:
newton ( [1 -6 8], 1, 0.01, 100)

ans =

1.99999995353885 4.00000004646115

07 Feb 2007 tzompantzi alejandro

06 Feb 2007 Rosario Ortiz Munuera

I am studing mathematics and I would like to get the Newton-Raphson algorithm written in matlab, if it's possible.

Comment only
12 Jan 2007 levent simsek

I need examples!!
could you give any inputs as an example??
thenk you!

Comment only
02 Dec 2006 ahmed mostefa

pogramme de gausse sedeil de ecoullement de puissance de reseaux electrique

Comment only
08 Nov 2006 augusto rodriguez

I need to learn more about matlab programing

26 Oct 2006 JULIAN YEPES


07 Jun 2006 mh oooo

that's good

27 Apr 2006 muhammed kýlýnç

26 Apr 2006 ali dönmez

very good

Comment only
04 Apr 2006 koko dzambo

25 Mar 2006 liapunov popov

05 Mar 2006 liliana jaimes

01 Mar 2006 sheikh tamjid mashrafi

12 Dec 2005 Daniel C

18 Nov 2005 Cosme Rafael Marcano-Gamero

It's very good

17 Sep 2005 samir cosickic

15 Aug 2005 abooboo kong

cool very cool

08 Apr 2005 AIT MOUDID Lahcen

It's good "coeff_function!"

19 Feb 2005 Henry Osorio

Very good

05 Dec 2004 senad hodzic

it's good

08 Nov 2004 said morjani

power system analysis
newton raphson method
programmation matlab

Comment only
08 Nov 2004 said morjani

power system analysis

Comment only
25 Sep 2004 Antony Chatu

do you by any chance have matlab codes to solve the following system of equations using newton raphson method, etc :

f(x,y) = x^2 - cosy = 0
g(x,y) = sinx + x^2 + y^3 = 0

please kindly forward us the codes if it is possible.

Comment only
10 May 2004 belkharroubi mohamed

power system analysis
newton raphson method
programmation matlab

Comment only
26 Apr 2004 haidas med

help me for newton raphson method in modelind the Insulat Gate bipolar Transistor

07 Apr 2004 k.l narayana

kindly send me the newton raphson method for solving two variables as my project involves solving for two variables using newton-raphson method.

Comment only
22 Apr 2016 1.0

BSD License

Contact us