[Top][All Lists]

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

regarding use of fzero in octave.

From: Srinivasan Kalyanam
Subject: regarding use of fzero in octave.
Date: Mon, 8 Feb 2016 17:40:01 +0000 (UTC)

Hi all,
       I have started using octave recently and i am having problem in using 
the fzero and fsolve functions. I tried to google but did not work. I have a 
function as follows

function y=tc(x,c,d)
 y=exp(x) - x^2 + 3*x - 2+c-d;

            I am trying to findout value of x at which the above expression is 
zero.  When I give c & d as global variables and give 
x=fzero(@tc,1,options), it works.  However, when I try to pass c & d also 

x=fzero(@tc(1,0.3,-0.3),1,options), I get following error

error: fzero: subscript indices must be either positive integers less than 2^31 
or logicals
error: called from
    fzero at line 158 column 10
  can somebody help.  I have installed the optimization package.

Thank you 
With sincere regards

K. Srinivasan
TC 55/2508 (26), Flat 2B, Sreedevi Apartments,
Near MMRHS School, Neeramankara,
Kaimanam P.O.,
Thiruvanthapuram - 695 040
Ph:   -00-91-92495-83843

reply via email to

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