[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: passing parameters to fzero, fsolve?
From: |
doctordorkusmalorkus |
Subject: |
Re: passing parameters to fzero, fsolve? |
Date: |
Mon, 28 Jan 2013 13:48:54 -0800 (PST) |
I thought there was a way to pass parameters as well, but I can't get it to
work anymore.
But, you can always pass variables by making them global. For example in
your code you can call your parameter Me, then, in octave:
global Mg
Mg=Me;
req=fzero(@zeroRadiusMeHc,[1.001,10]);
where
function zero=zeroRadiusMeHc(r)
global Mg
zero=6*Mg-4;
end
--
View this message in context:
http://octave.1599824.n4.nabble.com/passing-parameters-to-fzero-fsolve-tp1637028p4649219.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Re: passing parameters to fzero, fsolve?,
doctordorkusmalorkus <=