help-octave
[Top][All Lists]
Advanced

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

Re: nonlinear equation help


From: fv2005
Subject: Re: nonlinear equation help
Date: Fri, 2 Sep 2011 12:38:44 -0700 (PDT)

I already specified that we use information found online. I referred to the
Octave documentation.
Here it's my work script:
global w5 = 5.83*72; h5 = 8.27*72; lm = 0.78; rm = 0.3;
global wb = 504; hb = 662; lb = 71; tb = 43; rb = 433; bb = 604;
rb = wb-rb;
bb = hb-bb;

function y = f(x)
        y = zeros(3,1);
        global w5;
        global wb;
        global lb;
        global rb;
        global lm;
        global rm;
        y(1) = w5 - x(1)*(wb+x(2)+x(3));
        y(2) = x(1)*(x(2)+lb) - 72*lm;
        y(3) = x(1)*(x(3)+rb) - 72*rm;
endfunction

[x, info] = fsolve (@f, [1; 3]);

When i run this script i got this error:
error: A(I): Index exceeds matrix dimension.
error: called from:
error:   f at line 33, column 7
.........................................



--
View this message in context: 
http://octave.1599824.n4.nabble.com/nonlinear-equation-help-tp3785729p3786912.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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