On Tuesday, April 28, 2015 05:45:10 AM 'Antoine Messager' via julia-users 
wrote:
> The previous picture was only an example, I should by the end solve non
> linear system of dimension 500. I expect NLsolve to work with one dimension
> too.
> 
> I have not figure out how to use anonymous function within NLsolve. I don't
> understand of what README Tim Holy you are talking about.

Ah, I was misreading that as NLopt.jl. There's one anonymous function on 
https://github.com/EconForge/NLsolve.jl, but it isn't explicitly used. Still, 
it seems like it should work. If you can't figure it out (and the NLopt README 
might give some good examples/inspiration), I'd recommend trying opening an 
issue with NLsolve or trying to fix the problem and contributing it to NLsolve.

Best,
--Tim

> I went on the
> julia docs and on wikipedia and I have found the following definition:
> *   h = (x,z)->[z^2-1+x,x^2-z^3]*
> or
>  *function (x,z)*
>      *[z^2-1+x,x^2-z^3]*
> *  end*
> But it does not seem to work. When it is not a problem of number of
> argument, It is said that *`*` has no method matching *(::Array{Float64,1},
> 
> ::Array{Float64,1}) *so I used *h = (x,z)->[z.^2-1+x,x.^2-z.^3] *but it
> 
> does not give the correct result.
> 
> In the loop the function is always under the same name but the function is
> located into a different place:
> 
> for instance for the first iteration:
> 
> *##f#32489 (generic function with 1 method) *
> 
> and for the second one:
> 
> *##f#32490 (generic function with 1 method)*
> 
> and so on...
> 
> So it seems that new space is allocated at each iteration even if the
> function is created under the same name (myfun).
> Le mardi 28 avril 2015 13:27:21 UTC+1, Yuuki Soho a écrit :
> > Do you really need to use a different name for your function each time ?
> > you could just use the same name it seems. I'm not sure it would solve the
> > problem though.

Reply via email to