Pkg.add("Optim")
then
using Optim
and follow this section of the
docs:
http://www.juliaopt.org/Optim.jl/stable/user/minimization/#minimizing-a-univariate-function
--John
On Friday, November 18, 2016 at 7:29:28 PM UTC-8, Pranav Bhat wrote:
>
> How do I obtain the maximum value of a functio
How do I obtain the maximum value of a function over an interval?
In R I would do something like:
f <- function(x) { x ^ 2}
optimize(f, c(0, 100), maximum=TRUE)
You @enter the function, not the file. What function would you call once
you include test.jl? That is the function to which you should prepend
@enter.
On Fri, Nov 18, 2016 at 6:49 PM, wrote:
>
>
> Hi there,
>
> I'm totally new to the new debuggers. What I'm aiming at is to go through
> a file (i
I guess the following is buggy code
dict = Dict(x=>x for x in 1:100);
for x in keys(dict)
delete!(dict, x)
end
As we need to `collect(keys(...))` to make a copy.
However the code above still runs with correct results. Even when it fails
to return correct results, no erro
To start, I'm new to Julia and I'm trying things out to test Julia out for
some scientific/engineering applications. In particular, I'm working on
moderate size projects, where they're big enough that I'll need more than
one file with code in it to stay organized (let's say anywhere from 5-50
Have a look please https://github.com/hpoit/MLN.jl/tree/master/BN
On Friday, November 18, 2016 at 11:48:58 AM UTC-2, Yichao Yu wrote:
>
> On Thu, Nov 17, 2016 at 2:39 PM, Kevin Liu >
> wrote:
> > Right, I need the instance of Factor
>
> Then use the instance of Factor.
>
> >
> > On Thursday,
Hi there,
I'm totally new to the new debuggers. What I'm aiming at is to go through a
file (it's a file calling other packages and functions therein.) line by
line, just like in matlab. The first step is to step in the file using
gallium. I know how to traverse a function in terminal using Ga
On Thu, Nov 17, 2016 at 2:39 PM, Kevin Liu wrote:
> Right, I need the instance of Factor
Then use the instance of Factor.
>
> On Thursday, November 17, 2016 at 5:33:05 PM UTC-2, Yichao Yu wrote:
>>
>> On Thu, Nov 17, 2016 at 2:27 PM, Kevin Liu wrote:
>> > I replaced Factor[:FactorMargin]() with