help-octave
[Top][All Lists]
Advanced

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

Re: Octave: invalid use of script in index expression


From: Julien Bect
Subject: Re: Octave: invalid use of script in index expression
Date: Wed, 20 Mar 2013 17:23:17 +0100
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130308 Thunderbird/17.0.4

On 20/03/2013 17:14, c. wrote:
%%% FillDistance.m

hX = FillDistance(x,y)
neval = 40;
grid=linspace(0,1,neval);
[xe,ye]=meshgrid(grid);
epoints=[xe(:) ye(:)];
ctrs=[x y];
DM_eval=DistanceMatrix(epoints,ctrs);
hX=max(min(DM_eval'));

What about simply adding the keyword 'function' on the first line, like this :

function hX = FillDistance(x,y)

?


reply via email to

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