help-octave
[Top][All Lists]
Advanced

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

using cellfunction


From: BOKU
Subject: using cellfunction
Date: Thu, 11 May 2017 21:41:22 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.6.0

Hello,

I would to apply a function to a 3x371 cell array

so my question would if there is a solution to the following

for i=1:numel(values) ####### wrapping elements to get access in cellfunktion
####### because cellfunction does just deliver the cellaray
wrapobj{1,i}=foundimfilt{i}; ####### I hoped that it will deliver the 3x1 cell
   wrapobj{2,i}=ref{i};
   wrapobj{3,i}=meanval{i};

endfor


function [pointsel]= similarpoints(f)

idxl=f(1,1)(:,:,1)>f(3,1)(7)+0.3 | f(1,1)(:,:,1)<f(3,7)-0.3& f(1,1)(:,:,2)>f(1,3)(6)+0.3 | f(1,1)(:,:,2)<f(1,3)(6)-0.3 ... ####### so that i can access the data in the &f(1,1)(:,:,3)>f(1,3)(8)+0.3 | f(1,1)(:,:,3)<f(1,3)(8)-0.3; ####### function

idxl=imcomplement(idxl);
pointsel=medfilt2(idxl,[10,10]);
endfunction


pointselection = cellfun(@similarpoints, wrapobj,"UniformOutput" ,false ); ############ but unfortunately it seems that i don't get the full cell


error: f(7): out of bound 1
error: called from
    similarpoints at line 3 column 10


is there a solution for the indexing or the delivering the needed informations for the function. Basicly i want to apply an individual filter to every cell and I need the information stored in wrapobj{3,i} to apply it on the matrix stored in wrapobj{1,i}!

wrapobj is a 3x371 cell array.

i would appreciate any help on this

cheers chris






reply via email to

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