help-octave
[Top][All Lists]
Advanced

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

error on arrayfun function


From: joe_001
Subject: error on arrayfun function
Date: Thu, 9 Oct 2008 17:51:31 -0700 (PDT)

When using arrayfun function I receive the following error message -

error: octave_base_value::cell_value(): wrong type argument 'bool'
error: cellfun: Dimension mismatch

Actual code is below, how can I fix code to avoid this message?


function case_generation4()
  
% Data
A=[1 1 4;
   2 2 4;
   4 0.5 6];

% Engine
n=size(A,1)
Aspan = arrayfun(@(k) A(k,1):A(k,2):A(k,3), 1:n,'UniformOutput', false)
[Aspan(:)]=ndgrid(Aspan(:));
C=reshape(cat(n+1,Aspan(:)),[],n)
endfunction
-- 
View this message in context: 
http://www.nabble.com/error-on-arrayfun-function-tp19910107p19910107.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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