help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to find polynomial roots in OCTAVE?help...


From: James Sherman Jr.
Subject: Re: how to find polynomial roots in OCTAVE?help...
Date: Thu, 14 Jun 2007 12:12:18 -0400

Two things I can think of:
1) If your function has only rational exponents, such as:

x^4/3 - 21.3x^1/3 - 4.53^4/3 =0, (I'm assuming you meant x here instead of h in the second argument),  you could solve the related polynomial,
y^4 - 21.3y - 4.53^4/3 = 0 for y, then just have y^3 = x;

or

2) Download and install the optimization package from the octave website and use the fzero function.

Hope this helps.

James

On 6/14/07, jub <address@hidden> wrote:

i'm trying to find the roots of this equation:

x^4/3 - 21.3h^1/3 - 4.53^4/3 =0

in OCTAVE. the problem is the exponent is a fraction. i know how
to find the root if the exponent is in whole number in OCATVE, but how about
exponents? can someone guide me on how to find the root using OCATVE with
exponential functions?

in OCTAVE lets say you want to find the root of:

2x + 4

the syntax will be:

a = [2, 4];
roots(a)

so if you want to find the root of x^(n+1)+ ... + n
( assuming 'n' is an integer >0, and x is the coefficient)
just put:

a = [x, ..., n]; /*so you put the coefficient with the
highest exponent first followed by the
lowest*/
roots(a);


now this is no problem with exponent with type integer...but how about
fractional?




thanks!
--
View this message in context: http://www.nabble.com/how-to-find-polynomial-roots-in-OCTAVE-help...-tf3919829.html#a11114438
Sent from the Octave - General mailing list archive at Nabble.com.

_______________________________________________
Help-octave mailing list
address@hidden
https://www.cae.wisc.edu/mailman/listinfo/help-octave


reply via email to

[Prev in Thread] Current Thread [Next in Thread]