help-octave
[Top][All Lists]
Advanced

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

problems with arrayfun


From: tobilo
Subject: problems with arrayfun
Date: Wed, 30 Jan 2013 17:29:10 -0800 (PST)

Hi,

I am using octave 3.0.5 on a linux cluster. 

the following lines work fine in matlab, but fail in octave:

iid = arrayfun(@subfunc1,(1:n)','UniformOutput',false);

function iid = subfunc1(i)
    j  = (i+1:n)'; 
    d = sqrt(sum(bsxfun(@minus,X(i,:),X(j,:)).^2,2));
    I  = d<=dmax;
    iid = [j(I) d(I)];
end


Error is

error: octave_base_value::cell_value(): wrong type argument `bool'
error: cellfun: Dimension mismatch
error: called from `arrayfun' in file
`/soft/octave/3.0.5/share/octave/3.0.5/m/general/arrayfun.m'


Any ideas? Thanks in advance!




--
View this message in context: 
http://octave.1599824.n4.nabble.com/problems-with-arrayfun-tp4649303.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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