help-octave
[Top][All Lists]
Advanced

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

fsolve with varying parameters


From: jwilley44
Subject: fsolve with varying parameters
Date: Wed, 1 Sep 2010 17:43:49 -0700 (PDT)

I have not been able to figure out how use fsolve to solve an equation
multiple times while varying one parameter. Here is what I mean

P=linspace(0,1,100)

function y=f(x,p)
   y = 1/x + p/(1+x)
endfunction

for i=1:1000
   fsolve( f(x,P(i)), 1.)
endfor

I realize the syntax for defining that function may not be correct but I
hope that it conveys my idea.

thanks in advance
-- 
View this message in context: 
http://octave.1599824.n4.nabble.com/fsolve-with-varying-parameters-tp2445619p2445619.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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