Thank you for the clarification. On Fri, Oct 28, 2016 at 8:23 PM, Yichao Yu <yyc1...@gmail.com> wrote:
> On Fri, Oct 28, 2016 at 2:19 PM, Michele Zaffalon > <michele.zaffa...@gmail.com> wrote: > > I have read somewhere that your second approach is doing two things at > the > > same time: defining an anonymous function and assigning the name f to it. > > No it's not. It defines a function named `f` > > f = function () > end > > defines an anonymous function and assigns it to a variable f. > > > > > > > On Fri, Oct 28, 2016 at 8:12 PM, digxx <diger_d...@hotmail.com> wrote: > >> > >> So an anonymous function I can write like this > >> > >> f=x->x^2 > >> > >> is it also possible to make an anonymous function out of this: > >> > >> function f(x) > >> > >> x^2 > >> > >> end > > > > >