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: Henry F. Mollet
Subject: Re: how to find polynomial roots in OCTAVE?help...
Date: Fri, 15 Jun 2007 18:39:50 -0700
User-agent: Microsoft-Entourage/11.1.0.040913

fsolve was suggested and it works.
octave:10> function [y]=f(x)
> y=x^(4/3)-21.3*x^(1/3)-4.53^(4/3);
> end
octave:11> f(0)
ans = -7.4954

octave:20> x=linspace(-100,100,1000);
octave:21> plot (x,f(x))
Shows that good initial value is important. x=0 won't do.

octave:22> [X, INFO, MSG] = fsolve ('f', 10)
X = 23.902
INFO = 1
MSG = solution converged within specified tolerance
Henry


on 6/14/07 7:57 PM, jub at address@hidden wrote:

> 
> 
> 
> James Sherman Jr.-2 wrote:
>> 
>>  then just have y^3 = x;
>> 
> 
> you mean y^(1/3)=x is it? yeah the 'h' is the 'x', sorry :-P




reply via email to

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