I am using cellfun to apply a function on train and test variables for feature extraction. The function works absolutely fine when used without cellfun but with cellfun it gives an error. The code which I'm running:
RRTrain1 = cellfun(@(x)[rrvec] == RRfeatures(x),XTrain,'UniformOutput',false);
And this is the error which is appearing,
Unrecognized function or variable 'rrvec'.
Error in @(x)[rrvec]==RRfeatures(x)
However, rrvec is already declared within RRfeatures function. Can anyone please suggest how to solve this issue?