[Top][All Lists]

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

at-sign in function call

From: Wolfgang Lindner
Subject: at-sign in function call
Date: Wed, 14 Jun 2006 13:48:50 +0200

Dear Octaver's,

I came across the following call in a file written for 'TheOther'LAB:

mu = 2; sigma = 1;
x = normrnd(mu, sigma, 1, 10)
k = (1:1:10)
anfMu = 0;
[MU, R, J] = nlinfit(k, x, @constMu, anfMu)
       function [values] = constMu(mu, x)
       values = mu*ones(size(x));

As far I as can see [1] invokes only a user defined function.
Using octave 2.1.50 the use of @ in a name produces an error.

Q: what is the meaning of @?
   Is it sufficent to use e.g. an inline-function in octave?
   Or is there a special idea behind the @-constuction and is there
   an octave eqivalent or a work around?
   What are your recommendations?


Wolfgang Lindner, Stieglitzweg 6, D-42799 Leichlingen/Germany
Staedtisches Gymnasium,  Stockhauserstr. 13,  42929 Wermelskirchen

reply via email to

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